CSS 테두리 간격 속성
예시
테이블의 테두리 간격 설정:
#table1 {
border-collapse: separate;
border-spacing: 15px;
}
#table2 {
border-collapse: separate;
border-spacing: 15px 50px;
}
정의 및 사용
속성 은 border-spacing
인접한 셀의 경계 사이의 거리를 설정합니다.
참고: 이 속성은 border-collapse 가 분리된 경우에만 작동합니다.
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
Property | |||||
---|---|---|---|---|---|
border-spacing | 1.0 | 8.0 | 1.0 | 1.0 | 4.0 |
CSS 구문
border-spacing: length|initial|inherit;
속성 값
Value | Description | Play it |
---|---|---|
length length | Specifies the distance between the borders of adjacent cells in px, cm, etc. Negative values are not allowed.
|
|
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
관련 페이지
CSS 튜토리얼: CSS 테이블
HTML DOM 참조: borderSpacing 속성