当前位置: 首页 > 网络学院 > 网页制作基础教程 > CSS > CSS border-color属性

CSS
CSS2 Aural
CSS 单位
CSS 颜色
CSS 颜色值
CSS 颜色名称
CSS 编码与组织技巧
CSS 模块化设计思路
CSS完美兼容IE6/IE7/FF的通用方法
CSS @ Ten: 下一个重要的东西

CSS border-color属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 390 ::
收藏到网摘: n/a

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}
top and bottom border will be red, left and right border will be green 
上下边框颜色为红色,左右边框颜色为绿色

table {border-color: red green blue}
top border will be red, left and right border will be green, bottom border will be blue
上边框颜色为红色,左右边框颜色为绿色,下边框颜色为蓝色

table {border-color: red green blue yellow}
top border will be red, right border will be green, bottom border  will be blue, left border will be 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
边框色为透明

评论 (0) All

登陆 | 还没注册?