企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
## border-right 属性 ### 属性定义及使用说明 border-right 简写属性把左边框的所有属性设置到一个声明中。 可以设置的属性是(按顺序):border-right-width, border-right-style, and border-right-color. 如果上述值缺少一个,没有关系,例如border-right:solid #ff0000; 是允许的。 JavaScript 语法:object&nbsp;object.style.borderRight="3px solid blue" * * * ## 浏览器支持 ![Internet Explorer](https://atts.w3cschool.cn/attachments/image/compatible_ie.gif "Internet Explorer")![Firefox](https://atts.w3cschool.cn/attachments/image/compatible_firefox.gif "Firefox")![Opera](https://atts.w3cschool.cn/attachments/image/compatible_opera.gif "Opera")![Google Chrome](https://atts.w3cschool.cn/attachments/image/compatible_chrome.gif "Google Chrome")![Safari](https://atts.w3cschool.cn/attachments/image/compatible_safari.gif "Safari") 所有主要浏览器都支持border-right属性。 **注意**IE7和更早的版本不支持"继承"的值。 IE8需要定义!DOCTYPE。 IE9支持"继承"。 * * * ## Property Values | 值 | 说明 | | :-- | :-- | | *[border-right-width](https://www.w3cschool.cn/cssref/pr-border-right-width.html)* | 指定右边框的宽度 | | *[border-right-style](https://www.w3cschool.cn/cssref/pr-border-right-style.html)* | 指定右边框的样式 | | *[border-right-color](https://www.w3cschool.cn/cssref/pr-border-right-color.html)* | 指定右边框的颜色 | | inherit | 指定了border-right属性的值,应该从父元素继承 | * * * ## 实例 -- 设置右边框的样式: ``` <!DOCTYPE html> <html> <head> <style> p { border-style:solid; border-right:thick double #ff0000; } </style> </head> <body> <p>This is some text in a paragraph.</p> </body> </html> ```