ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
## border-bottom-color 属性 border-bottom-color属性设置元素的底部边框颜色。 **注意**使用border-bottom颜色属性前,必须先声明border样式属性。元素必须有边框,你才可以改变颜色。 JavaScript 语法:object&nbsp;object.style.borderBottomColor="blue" * * * ## 浏览器支持 ![Internet Explorer](https://7n.w3cschool.cn/statics/images/course/compatible_ie.gif "Internet Explorer")![Firefox](https://7n.w3cschool.cn/statics/images/course/compatible_firefox.gif "Firefox")![Opera](https://7n.w3cschool.cn/statics/images/course/compatible_opera.gif "Opera")![Google Chrome](https://7n.w3cschool.cn/statics/images/course/compatible_chrome.gif "Google Chrome")![Safari](https://7n.w3cschool.cn/statics/images/course/compatible_safari.gif "Safari") 所有主要浏览器都支持border-bottom-color属性。 **注意**Internet Explorer6(和更早版本)不支持"transparent"属性值。 **注意**IE7和更早的版本不支持"inherit(继承)"的值。 IE8需要定义!DOCTYPE。 IE9支持"inherit(继承)"。 * * * ## Property Values | 值 | 描述 | 测试 | | :-- | :-- | :-- | | *color* | 指定背景颜色。在CSS[颜色值](https://www.w3cschool.cn/cssref/css-colors-legal.html)查找颜色值的完整列表。 | | transparent | 指定边框的颜色应该是透明的。这是默认 | | inherit | 指定边框的颜色,应该从父元素继承 |   | **实例** ``` <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>W3Cschool教程(w3cschool.cn)</title> <style> p { border-style:solid; border-bottom-color:#ff0000; } </style> </head> <body> <p>This is some text in a paragraph.</p> </body> </html> ```