Style borderRightStyleProperty

Style 对象参考手册Style Object

Definition and Usage

The borderRightStyle property sets or returns the style of the right border of an element.

Syntax

Set the borderRightStyle property:

Object.style.borderRightStyle="value"

Return the borderRightStyle property:

Object.style.borderRightStyle

Value Description
none Default. Defines no border.
hidden Same as "none". However, for tables, "hidden" is used to resolve border conflicts.
dotted Defines a dotted border.
dashed Defines a dashed border.
solid Defines a solid border.
double Defines a double border. The width of the double line equals the value of border-width.
groove Defines a 3D grooved border. The effect depends on the value of border-color.
ridge Defines a 3D ridged border. The effect depends on the value of border-color.
inset Defines a 3D inset border. The effect depends on the value of border-color.
outset Defines a 3D outset border. The effect depends on the value of border-color.
inherit The style of the right border is inherited from the parent element.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the borderRightStyle property.

Note:IE7 and earlier versions do not support the "inherit" value. IE8 supports "inherit" only if a !DOCTYPE is specified. IE9 supports "inherit".


Examples

Examples

Change the style of the right border:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Rookie Tutorial (example.com)</title>
<style type="text/css">
#ex1{
    border: 1px solid #FF0000;
}
</style>
<script>
function displayResult(){
    document.getElementById("ex1").style.borderRightStyle="dotted";
}
</script>
</head>
<body>

<div id="ex1">This is some text.</div>
<br>
<button type="button" onclick="displayResult()">Change the style of the right border</button>

</body>
</html>

Try it yourself »


Style 对象参考手册Style Object Other extensions