向 <div> 元素添加 "solid" 右边框:
document.getElementById("myDiv").style.borderRightStyle = "solid";
亲自试一试 »
borderRightStyle 属性设置或返回元素右边框的样式。
Property | |||||
---|---|---|---|---|---|
borderRightStyle | Yes | Yes | Yes | Yes | Yes |
返回 borderRightStyle 属性:
object.style.borderRightStyle
设置 borderRightStyle 属性:
object.style.borderRightStyle =
value
Value | Description |
---|---|
none | Defines no border. This is default |
hidden | Same as "none", except in border conflict resolution for table elements |
dotted | Defines a dotted border |
dashed | Defines a dashed border |
solid | Defines a solid border |
double | Defines two borders. The width of the two borders are the same as the border-width value |
groove | Defines a 3D grooved border. The effect depends on the border-color value |
ridge | Defines a 3D ridged border. The effect depends on the border-color value |
inset | Defines a 3D inset border. The effect depends on the border-color value |
outset | Defines a 3D outset border. The effect depends on the border-color value |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
默认值: | 没有任何 |
---|---|
返回值: | 一个 String,代表元素右边框的样式 |
CSS版本 | CSS1 |
将 <div> 元素右边框的样式更改为"dotted":
document.getElementById("myDiv").style.borderRightStyle = "dotted";
亲自试一试 »
所有不同值的演示:
var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderRightStyle = listValue;
亲自试一试 »
CSS教程:CSS 边框
CSS 参考:右边界样式属性
HTML DOM 参考:边境属性
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!