border-left-color
border-left-color 属性设置元素的左边框颜色。值得注意的是,在大数情况下使用
border-color
或
border-left
更加方便和普遍。
示例
/* <color> values */ 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; /* global values */ border-left-color: inherit; border-left-color: initial; border-left-color: unset;
浏览器支持
![]() |
![]() |
![]() |
![]() |
![]() |
浏览器都支持
border-left-color
|
语法
border-left-color : <color>
取值:
<color>
:取值
rgb()
|
rgba()
|
hsl()
|
hsla()
|
Color Name
|
currentColor
|
deprecated-system-color
例子
<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 .mybox { border: solid 0.3em gold; border-left-color: red; width: auto; } .redtext { color: red; }