스타일 borderCollapse 속성
예시
테이블 테두리 축소:
document.getElementById("myTable").style.borderCollapse = "collapse";
아래에서 더 많은 "직접 사용해 보기" 예를 살펴보세요.
정의 및 사용
borderCollapse 속성은 테이블 테두리를 단일 테두리로 축소할지 여부를 설정하거나 반환합니다.
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
Property | |||||
---|---|---|---|---|---|
borderCollapse | 1.0 | 5.0 | 1.0 | 1.2 | 4.0 |
통사론
borderCollapse 속성을 반환합니다.
object.style.borderCollapse
borderCollapse 속성을 설정합니다.
object.style.borderCollapse = "separate|collapse|initial|inherit"
속성 값
Value | Description |
---|---|
separate | Separate borders are drawn for all table cell elements. This is default |
collapse | Borders are not drawn between table cell elements |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
기술적 세부 사항
기본값: | 분리 된 |
---|---|
반환 값: | 테이블의 테두리를 나타내는 문자열 |
CSS 버전 | CSS2 |
더 많은 예
예시
borderCollapse 속성을 반환합니다.
alert(document.getElementById("myTable").style.borderCollapse);
관련 페이지
CSS 튜토리얼: CSS 테이블
CSS 참조: border-collapse 속성