HTML DOM 스타일 borderBottomStyle 속성
정의 및 사용
borderBottomStyle의 속성 집합 또는 요소 스타일의 아래쪽 테두리를 반환합니다.
문법
borderBottomStyle 속성 설정 :
Object.style.borderBottomStyle="value"
위로 borderBottomStyle 속성 :
Object.style.borderBottomStyle
值 | 描述 |
---|---|
none | 默认。定义无边框。 |
hidden | 与 "none" 相同。不过应用于表时除外,对于表,hidden 用于解决边框冲突。 |
dotted | 定义点状边框。 |
dashed | 定义虚线边框。 |
solid | 定义实线边框。 |
double | 定义双线边框。双线的宽度等于 border-width 的值。 |
groove | 定义 3D 凹槽边框。其效果取决于 border-color 的值。 |
ridge | 定义 3D 垄状边框。其效果取决于 border-color 的值。 |
inset | 定义 3D inset 边框。其效果取决于 border-color 的值。 |
outset | 定义 3D outset 边框。其效果取决于 border-color 的值。 |
inherit | 下边框的样式从父元素继承。 |
브라우저 지원
모든 주요 브라우저는 borderBottomStyle 속성을 지원합니다.
참고 : IE7 및 이전 버전은 "상속"값을 지원하지 않습니다.IE8은 "상속"지원!의 DOCTYPE을 제공합니다. IE9 지원 "상속".
예
예
아래쪽 테두리의 스타일을 변경합니다 :
<html>
<head>
<style type="text/css">
#ex1
{
border: 1px solid #FF0000;
}
</style>
<script>
function displayResult()
{
document.getElementById("ex1").style.borderBottomStyle="dotted";
}
</script>
</head>
<body>
<div id="ex1">This is some text.</div>
<br>
<button type="button" onclick="displayResult()">Change style of bottom border</button>
</body>
</html>
<head>
<style type="text/css">
#ex1
{
border: 1px solid #FF0000;
}
</style>
<script>
function displayResult()
{
document.getElementById("ex1").style.borderBottomStyle="dotted";
}
</script>
</head>
<body>
<div id="ex1">This is some text.</div>
<br>
<button type="button" onclick="displayResult()">Change style of bottom border</button>
</body>
</html>
»시도
스타일 개체