HTML DOM borderBottomStyle 屬性
定義和用法
borderBottomStyle 屬性設(shè)置下邊框的樣式。
語(yǔ)法:
Object.style.borderBottomStyle=style
值 | 描述 |
---|---|
none | 定義無(wú)邊框。 |
hidden | 與 "none" 相同。不過(guò)應(yīng)用于表時(shí)除外,對(duì)于表,hidden 用于解決邊框沖突。 |
dotted | 定義點(diǎn)狀邊框。在大多數(shù)瀏覽器中呈現(xiàn)為實(shí)線。 |
dashed | 定義虛線。在大多數(shù)瀏覽器中呈現(xiàn)為實(shí)線。 |
solid | 定義實(shí)線。 |
double | 定義雙線。雙線的寬度等于 border-width 的值。 |
groove | 定義 3D 凹槽邊框。其效果取決于 border-color 的值。 |
ridge | 定義 3D 壟狀邊框。其效果取決于 border-color 的值。 |
inset | 定義 3D inset 邊框。其效果取決于 border-color 的值。 |
outset | 定義 3D outset 邊框。其效果取決于 border-color 的值。 |
實(shí)例
本例改變下邊框的樣式:
<html>
<head>
<style type="text/css">
p
{
border: thick solid #FF0000
}
</style>
<script type="text/javascript">
function changeBorder()
{
document.getElementById("p1").style.borderBottomStyle="dotted";
}
</script>
</head>
<body>
<input type="button" onclick="changeBorder()"
value="Change bottom border" />
<p id="p1">This is a paragraph</p>
</body>
</html>