多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## border-top-color 属性 ## 属性定义及使用说明 border-top-color 设置元素的上边框的颜色。 **注意**:请始终把border-style属性声明到border-top-color属性之前。元素必须在您改变其颜色之前获得边框。 JavaScript 语法:object.style.borderTopColor="blue" * * * ## 浏览器支持 表格中的数字表示支持该属性的第一个浏览器版本号。 | 属性 |   |   |   |   |   | | --- | --- | --- | --- | --- | --- | | border-top-color | 1.0 | 4.0 | 1.0 | 1.0 | 3.5 | * * * ## Property Values | 值 | 描述 | | --- | --- | | *color\_name* | 规定颜色值为颜色名称的边框颜色(比如 red)。 | | *hex\_number* | 规定颜色值为十六进制值的边框颜色(比如 #ff0000)。 | | *rgb\_number* | 规定颜色值为 rgb 代码的边框颜色(比如 rgb(255,0,0))。 | | transparent | 默认值。边框颜色为透明。 | | inherit | 规定应该从父元素继承边框颜色。 | * * * ## 实例--Set the color of the top border: ``` <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>W3Cschool教程(w3cschool.cn)</title> <style> p { border-style:solid; border-top-color:#ff0000; } </style> </head> <body> <p>This is some text in a paragraph.</p> </body> </html> ```