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

CSS
CSS 介绍
CSS 语法
使用 CSS
CSS 背景
CSS 文字
CSS 字体
CSS 边框
CSS 边距
CSS 填充
CSS 列表
CSS 尺寸
CSS 类别
CSS 定位
CSS 伪类
CSS 伪元素
CSS2 Media类型
CSS 摘要
CSS 实例
CSS2 参考资料
CSS2 打印

CSS border-color属性


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 389 ::
收藏到网摘: 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

登陆 | 还没注册?