border-left-color

Baseline Widely available

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

border-left-color CSS 속성은 요소의 왼쪽 테두리 색상을 지정합니다. border-color 또는 border-left 단축 속성으로도 지정할 수 있습니다.

시도해보기

구문

css
/* <color> 값 */
border-left-color: red;
border-left-color: #ffbb00;
border-left-color: rgb(255, 0, 0);
border-left-color: hsla(100%, 50%, 25%, 0.75);
border-left-color: currentColor;
border-left-color: transparent;

/* 전역 값 */
border-left-color: inherit;
border-left-color: initial;
border-left-color: unset;

border-left-color 속성은 하나의 값을 사용해 지정합니다.

<color>

왼쪽 테두리의 색상.

형식 구문

border-left-color = 
<color> |
<image-1D>

<image-1D> =
<stripes()>

<stripes()> =
stripes( <color-stripe># )

<color-stripe> =
<color> &&
[ <length-percentage> | <flex> ]?

<length-percentage> =
<length> |
<percentage>

예제

테두리를 가진 간단한 상자

HTML

html
<div class="mybox">
  <p>
    This is a box with a border around it. Note which side of the box is
    <span class="redtext">red</span>.
  </p>
</div>

CSS

css
.mybox {
  border: solid 0.3em gold;
  border-left-color: red;
  width: auto;
}

.redtext {
  color: red;
}

결과

명세

Specification
CSS Backgrounds and Borders Module Level 3
# border-color
초기값currentcolor
적용대상all elements. It also applies to ::first-letter.
상속no
계산 값computed color
Animation typea color

브라우저 호환성

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
border-left-color

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

같이 보기