스타일 borderLeftWidth 속성
예시
<div> 요소의 왼쪽 테두리 너비를 10px로 변경합니다.
document.getElementById("myDiv").style.borderLeftWidth = "10px";
정의 및 사용
borderLeftWidth 속성은 요소의 왼쪽 테두리 너비를 설정하거나 반환합니다.
브라우저 지원
Property | |||||
---|---|---|---|---|---|
borderLeftWidth | Yes | Yes | Yes | Yes | Yes |
통사론
borderLeftWidth 속성을 반환합니다.
object.style.borderLeftWidth
borderLeftWidth 속성을 설정합니다.
object.style.borderLeftWidth = "thin|medium|thick|length|initial|inherit"
속성 값
Value | Description |
---|---|
thin | Defines a thin border |
medium | Defines a medium border. This is default |
thick | Defines a thick border |
length | The width of the border in length units |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
기술적 세부 사항
기본값: | 중간 |
---|---|
반환 값: | 요소의 왼쪽 테두리 너비를 나타내는 String |
CSS 버전 | CSS1 |
더 많은 예
예시
<div> 요소의 왼쪽 테두리 너비를 가늘게 변경합니다.
document.getElementById("myDiv").style.borderLeftWidth = "thin";
예시
<div> 요소의 왼쪽 테두리 너비를 반환합니다.
alert(document.getElementById("myDiv").style.borderLeftWidth);
관련 페이지
CSS 튜토리얼: CSS 테두리
CSS 참조: border-left-width 속성
HTML DOM 참조: 테두리 속성