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 2015ë 7ì.
border-left-color CSS ìì±ì ììì ì¼ìª½ í
ë리 ììì ì§ì í©ëë¤. border-color ëë border-left ë¨ì¶ ìì±ì¼ë¡ë ì§ì í ì ììµëë¤.
ìëí´ ë³´ê¸°
border-left-color: red;
border-left-color: #32a1ce;
border-left-color: rgb(170, 50, 220, 0.6);
border-left-color: hsl(60, 90%, 50%, 0.8);
border-left-color: transparent;
<section class="default-example" id="default-example">
<div class="transition-all" id="example-element">
This is a box with a border around it.
</div>
</section>
#example-element {
background-color: #eee;
color: #000;
border: 0.75em solid;
padding: 0.75em;
width: 80%;
height: 100px;
}
구문
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 type | a color |
ë¸ë¼ì°ì í¸íì±
ê°ì´ 보기
- í
ë리 ê´ë ¨ CSS ë¨ì¶ ìì±:
border,border-left,border-color. - ë¤ë¥¸ ë°©í¥ í
ë리ì ìì ê´ë ¨ CSS ë¨ì¶ ìì±:
border-top-color,border-right-color,border-bottom-color. - ì¼ìª½ í
ë리 ê´ë ¨ CSS ìì±:
border-left-style,border-left-width.