💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# CSS border-right-style 属性 ## 实例 设置右边框的样式: ``` p { border-style:solid; border-right-style:dotted; } ``` ## 浏览器支持 | IE | Firefox | Chrome | Safari | Opera | | --- | --- | --- | --- | --- | 所有浏览器都支持 border-right-style 属性。 注释:任何的版本的 Internet Explorer (包括 IE8)都不支持属性值 "inherit" 或 "hidden"。 ## 定义和用法 border-right-style 设置元素右边框的样式。 只有当这个值不是 none 时边框才可能出现。 在 CSS1 中,HTML 用户代理只需支持 solid 和 none。 | 默认值: | _not specified_ | | --- | --- | | 继承性: | no | | --- | --- | | 版本: | CSS1 | | --- | --- | | JavaScript 语法: | _object_.style.borderRightStyle="dotted" | | --- | --- | ## 可能的值 | 值 | 描述 | | --- | --- | | none | 定义无边框。 | | hidden | 与 "none" 相同。不过应用于表时除外,对于表,hidden 用于解决边框冲突。 | | dotted | 定义点状边框。在大多数浏览器中呈现为实线。 | | dashed | 定义虚线。在大多数浏览器中呈现为实线。 | | solid | 定义实线。 | | double | 定义双线。双线的宽度等于 border-width 的值。 | | groove | 定义 3D 凹槽边框。其效果取决于 border-color 的值。 | | ridge | 定义 3D 垄状边框。其效果取决于 border-color 的值。 | | inset | 定义 3D inset 边框。其效果取决于 border-color 的值。 | | outset | 定义 3D outset 边框。其效果取决于 border-color 的值。 | | inherit | 规定应该从父元素继承边框样式。 | ## TIY 实例 [设置右边框的样式](/tiy/t.asp?f=csse_border-right-style) 本例演示如何设置右边框的样式。 ``` <!DOCTYPE html> <html> <head> <style type="text/css"> p.dotted {border-right-style: dotted} p.dashed {border-right-style: dashed} p.solid {border-right-style: solid} p.double {border-right-style: double} p.groove {border-right-style: groove} p.ridge {border-right-style: ridge} p.inset {border-right-style: inset} p.outset {border-right-style: outset} </style> </head> <body> <p class="dotted">A dotted border</p> <p class="dashed">A dashed border</p> <p class="solid">A solid border</p> <p class="double">A double border</p> <p class="groove">A groove border</p> <p class="ridge">A ridge border</p> <p class="inset">An inset border</p> <p class="outset">An outset border</p> </body> </html> ``` ## 相关页面 CSS 教程:[CSS 边框](/css/css_border.asp "CSS 边框") CSS 参考手册:[border-right 属性](/cssref/pr_border-right.asp "CSS border-right 属性") HTML DOM 参考手册:[borderRightStyle 属性](/jsref/prop_style_borderrightstyle.asp "HTML DOM borderRightStyle 属性")