Movatterモバイル変換


[0]ホーム

URL:


  1. 개발자를 위한 웹 기술
  2. CSS
  3. CSS 참고서
  4. Properties
  5. border-left

This page was translated from English by the community.Learn more and join the MDN Web Docs community.

View in EnglishAlways switch to English

border-left

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015년 7월.

border-leftCSS단축 속성은 요소의 왼쪽 테두리를 설정합니다.border-left-width,border-left-style,border-left-color의 값을 지정합니다.

시도해 보기

border-left: solid;
border-left: dashed red;
border-left: 1rem solid;
border-left: thick double #32a1ce;
border-left: 4mm ridge rgba(211, 220, 50, 0.6);
<section>  <div>    This is a box with a border around it.  </div></section>
#example-element {  background-color: #eee;  color: #8b008b;  padding: 0.75em;  width: 80%;  height: 100px;}

다른 단축 속성과 마찬가지로,border-left는 자신이 포함한 모든 값을 지정하며 사용자가 명시하지 않은 속성도 기본값으로 설정합니다. 즉, 아래 두 코드는 사실 동일합니다.

css
border-left-style: dotted;border-left: thick green;
css
border-left-style: dotted;border-left: none thick green;

따라서border-left보다 먼저 지정한border-left-style의 값은 무시됩니다.border-left-style의 기본값은none이므로,border-style을 명시하지 않으면 테두리를 만들지 않습니다.

구문

css
border-left: 1px;border-left: 2px dotted;border-left: medium dashed green;

border-left은 한 개에서 세 개의 값을 사용해 지정할 수 있고, 순서는 상관하지 않습니다.

<br-width>

border-left-width.

<br-style>

border-left-style.

<color>

border-left-color.

형식 구문

border-left =
<line-width>||
<line-style>||
<color>

<line-width> =
<length [0,∞]>|
thin|
medium|
thick

<line-style> =
none|
hidden|
dotted|
dashed|
solid|
double|
groove|
ridge|
inset|
outset

예제

html
<div>왼쪽 테두리를 가진 요소입니다.</div>
css
div {  border-left: 4px dashed blue;  background-color: gold;  height: 100px;  width: 100px;  font-weight: bold;  text-align: center;}

명세

Specification
CSS Backgrounds and Borders Module Level 3
# border-shorthands
초기값as each of the properties of the shorthand:
적용대상all elements. It also applies to::first-letter.
상속no
계산 값as each of the properties of the shorthand:
Animation typeas each of the properties of the shorthand:

브라우저 호환성

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp