--- title: border-left slug: Web/CSS/border-left tags: - CSS - CSS Borders - CSS Property - Reference - 테두리 translation_of: Web/CSS/border-left ---
border-left CSS 단축 속성은 요소의 왼쪽 테두리를 설정합니다. {{cssxref("border-left-width")}}, {{cssxref("border-left-style")}}, {{cssxref("border-left-color")}}의 값을 지정합니다.
다른 단축 속성과 마찬가지로, border-left는 자신이 포함한 모든 값을 지정하며 사용자가 명시하지 않은 속성도 기본값으로 설정합니다. 즉, 아래 두 코드는 사실 동일합니다.
border-left-style: dotted; border-left: thick green;
border-left-style: dotted; border-left: none thick green;
따라서 border-left보다 먼저 지정한 {{cssxref("border-left-style")}}의 값은 무시됩니다. {{cssxref("border-left-style")}}의 기본값은 none이므로, border-style을 명시하지 않으면 테두리를 만들지 않습니다.
border-left: 1px; border-left: 2px dotted; border-left: medium dashed green;
border-left은 한 개에서 세 개의 값을 사용해 지정할 수 있고, 순서는 상관하지 않습니다.
<br-width><br-style><div> 왼쪽 테두리를 가진 요소입니다. </div>
div {
border-left: 4px dashed blue;
background-color: gold;
height: 100px;
width: 100px;
font-weight: bold;
text-align: center;
}
{{EmbedLiveSample('예제')}}
| Specification | Status | Comment |
|---|---|---|
| {{SpecName('CSS3 Backgrounds', '#border-left', 'border-left')}} | {{Spec2('CSS3 Backgrounds')}} | No direct changes, though the modification of values for the {{cssxref("border-left-color")}} do apply to it. |
| {{SpecName('CSS2.1', 'box.html#propdef-border-left', 'border-left')}} | {{Spec2('CSS2.1')}} | No significant changes. |
| {{SpecName('CSS1', '#border-left', 'border-left')}} | {{Spec2('CSS1')}} | Initial definition |
{{Compat("css.properties.border-left")}}