CSS border-top-width 속성
예시
상단 테두리의 너비 설정:
div {border-top-width: thin;}
아래에서 더 많은 "직접 사용해 보기" 예를 살펴보세요.
정의 및 사용
속성 은 border-top-width
요소의 위쪽 테두리 너비를 설정합니다.
참고: 항상 속성 앞에 border-style 또는
border-top-style 속성을 선언하십시오 border-top-width
. 너비를 변경하려면 요소에 테두리가 있어야 합니다.
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
Property | |||||
---|---|---|---|---|---|
border-top-width | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
CSS 구문
border-top-width: medium|thin|thick|length|initial|inherit;
속성 값
Value | Description | Play it |
---|---|---|
medium | Specifies a medium top border. This is default | |
thin | Specifies a thin top border | |
thick | Specifies a thick top border | |
length | Allows you to define the thickness of the top border. Read about length units | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
더 많은 예
예시
상단 테두리의 너비를 중간으로 설정합니다.
div {border-top-width: medium;}
예시
상단 테두리의 너비를 두껍게 설정합니다.
div {border-top-width: thick;}
예시
상단 테두리의 너비를 1px로 설정합니다.
div {border-top-width: 1px;}
예시
상단 테두리의 너비를 15px로 설정합니다.
div {border-top-width: 15px;}
관련 페이지
CSS 튜토리얼: CSS 테두리
CSS 참조: border-top 속성
HTML DOM 참조: borderTopWidth 속성