HTML DOM Style borderBottomColor property
Definition and Usage
borderBottomColor property sets or returns the color of the bottom border of the element.
grammar
Setting borderBottomColor properties:
Object.style.borderBottomColor="color|transparent|inherit"
Back borderBottomColor properties:
Object.style.borderBottomColor
Tip: borderBottomColor property has no default value.
值 | 描述 |
---|---|
color | 规定下边框的颜色。在 CSS 颜色值 中寻找可能的颜色值的完整列表。 |
transparent | 下边框的颜色是透明的(基本内容将会穿透)。 |
inherit | 下边框的颜色从父元素继承。 |
Browser Support
All major browsers support borderBottomColor 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 bottom border:
<! DOCTYPE html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Style type = "text / css">
# Ex1 {
border: 1px solid # FF0000;
}
</ Style>
<Script>
function displayResult () {
. Document.getElementById ( "ex1") style.borderBottomColor = "# 00FF00";
}
</ Script>
</ Head>
<Body>
<Div id = "ex1"> This is some text. </ Div>
<br>
<Button type = "button" onclick = "displayResult ()"> change the color of the bottom border </ button>
</ Body>
</ Html>
<Html>
<Head>
<Meta charset = "utf-8">
<Title> This tutorial (w3big.com) </ title>
<Style type = "text / css">
# Ex1 {
border: 1px solid # FF0000;
}
</ Style>
<Script>
function displayResult () {
. Document.getElementById ( "ex1") style.borderBottomColor = "# 00FF00";
}
</ Script>
</ Head>
<Body>
<Div id = "ex1"> This is some text. </ Div>
<br>
<Button type = "button" onclick = "displayResult ()"> change the color of the bottom border </ button>
</ Body>
</ Html>
try it"
Style Objects