HTML DOM Style borderRightColor property
Definition and Usage
borderRightColor property sets or returns the element's right border color.
grammar
Setting borderRightColor properties:
Object.style.borderRightColor="color|transparent|inherit"
Back borderRightColor properties:
Object.style.borderRightColor
Tip: borderRightColor property has no default value.
值 | 描述 |
---|---|
color | 规定右边框的颜色。在 CSS 颜色值 中寻找可能的颜色值的完整列表。 |
transparent | 右边框的颜色是透明的(基本内容将会穿透)。 |
inherit | 右边框的颜色从父元素继承。 |
Browser Support
All major browsers support borderRightColor property.
Note: IE7 and earlier versions do not support the "inherit" value.IE8 only provides! DOCTYPE supported "inherit". IE9 support "inherit".
Examples
Examples
Change the color of the box on the right:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<style type="text/css">
#ex1{
border: 1px solid #FF0000;
}
</style>
<script>
function displayResult(){
document.getElementById("ex1").style.borderRightColor="#00FF00";
}
</script>
</head>
<body>
<div id="ex1">这是一些文本。</div>
<br>
<button type="button" onclick="displayResult()">修改右边框的颜色</button>
</body>
</html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<style type="text/css">
#ex1{
border: 1px solid #FF0000;
}
</style>
<script>
function displayResult(){
document.getElementById("ex1").style.borderRightColor="#00FF00";
}
</script>
</head>
<body>
<div id="ex1">这是一些文本。</div>
<br>
<button type="button" onclick="displayResult()">修改右边框的颜色</button>
</body>
</html>
try it"
Style Objects