Latest web development tutorials

HTML DOM 스타일 borderBottomWidth 속성

스타일 객체 참조 스타일 개체

정의 및 사용

borderBottomWidth는 속성 집합 또는 요소의 아래쪽 테두리의 폭을 돌려줍니다.

문법

borderBottomWidth 속성 설정 :

Object.style.borderBottomWidth="thin|medium|thick|length|inherit"

위로 borderBottomWidth 속성 :

Object.style.borderBottomWidth

描述
thin 定义细的边框。
medium 默认。定义中等的边框。
thick 定义粗的边框。
length 使用 px、cm 等单位定义边框的宽度。
inherit 下边框的宽度从父元素继承。


브라우저 지원

Internet ExplorerFirefoxOperaGoogle ChromeSafari

모든 주요 브라우저는 borderBottomWidth 속성을 지원합니다.

참고 : IE7 및 이전 버전은 "상속"값을 지원하지 않습니다.IE8은 "상속"지원!의 DOCTYPE을 제공합니다. IE9 지원 "상속".


아래쪽 테두리의 폭을 변경 :

<html>
<head>
<style type="text/css">
#ex1
{
border: 1px solid #FF0000;
}
</style>
<script>
function displayResult()
{
document.getElementById("ex1").style.borderBottomWidth="thick";
}
</script>
</head>
<body>

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

</body>
</html>

»시도


스타일 객체 참조 스타일 개체