CSS border-left 속성
예시
다른 요소의 왼쪽 테두리 스타일을 설정합니다.
h1 {
border-left: 5px solid red;
}
h2 {
border-left: 4px dotted blue;
}
div {
border-left: double;
}
정의 및 사용
속성은 ( border-left
다음 순서로)에 대한 약식 속성입니다.
- 테두리 왼쪽 너비
- 테두리 왼쪽 스타일 (필수)
- 테두리 왼쪽 색상
border-left-color를 생략하면 적용된 색상이 텍스트의 색상이 됩니다.
기본값: | 중간 색상 없음 |
---|---|
상속: | 아니요 |
애니메이션 가능: | 예, 개별 속성을 참조하십시오 . 애니메이션 가능 에 대해 읽기 |
버전: | CSS1 |
자바스크립트 구문: | object .style.borderLeft="3px 점선 파란색" |
브라우저 지원
표의 숫자는 속성을 완전히 지원하는 첫 번째 브라우저 버전을 지정합니다.
Property | |||||
---|---|---|---|---|---|
border-left | 1.0 | 4.0 | 1.0 | 3.5 | 1.0 |
CSS 구문
border-left: border-width border-style border-color|initial|inherit;
속성 값
Value | Description |
---|---|
border-left-width | Optional. Specifies the width of the left border. Default value is "medium" |
border-left-style | Required. Specifies the style of the left border. Default value is "none" |
border-left-color | Optional. Specifies the color of the left border. Default value is the color of the text |
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 참조: borderLeft 속성