当前位置: 首页 > 网络学院 > 网页制作基础教程 > CSS > CSS border-color属性
The border-color property sets the color of the four borders. This property
can take one to four colors.
border-color 属性可设置四条边的颜色,这个属性可以有1个到4个颜色
Note: Always declare the border-style property before the border-color
property. An element must have borders before you change the color of them.
注意:请在border-color前先声明border-style属性。元素必须在改变边框颜色前先有它们(先有边框后有边框色)
继承性: 无
table {border-color: red} all four borders will be red 四边框颜色全为红色 table {border-color: red green} table {border-color: red green blue} table {border-color: red green blue yellow} |
值 | 描述 |
---|---|
color | The color value can be a color name (red), a rgb value (rgb(255,0,0)), or a hex number (#FF0000). color值可以是颜色名称,或是rgb值(rgb(255,0,0)),或是十六进制数(#F00) |
transparent | The border is transparent 边框色为透明 |