borderBottomWidth 속성은 요소의 하단 테두리 너비를 설정하거나 가져오는 데 사용됩니다.
구문
다음은 −
의 구문입니다.borderBottomWidth 속성 설정 -
object.style.borderBottomWidth = "thin|medium|thick|length|initial|inherit"
값
속성 값은 다음과 같이 설명됩니다 -
| Sr.No | 가치 및 설명 |
|---|---|
| 1 | 얇음 얇은 테두리를 지정합니다. |
| 2 | 중간 이것은 중간 테두리를 지정하며 기본값입니다. |
| 3 | 두꺼움 얇은 테두리를 지정합니다. |
| 4 | 길이 길이 단위로 테두리 너비를 지정하는 데 사용됩니다. |
| 5 | 초기 이 속성을 초기 값으로 설정합니다. |
| 6 | 상속 상위 속성 값을 상속하려면 |
예시
borderBottomWidth 속성의 예를 살펴보겠습니다. -
<!DOCTYPE html>
<html>
<head>
<style>
#DIV1{
height: 100px;
width: 200px;
border: 10px groove orange;
padding: 10px;
border-bottom-width:30px;
}
</style>
<script>
function changeBottomWidth(){
document.getElementById("DIV1").style.borderBottomWidth="1px";
document.getElementById("Sample").innerHTML="The bottom border width is now
decreased";
}
</script>
</head>
<body>
<div id="DIV1">SOME SAMPLE TEXT</div>
<p>Change the above div bottom border width by clicking the below button</p>
<button onclick="changeBottomWidth()">Change Bottom Width</button>
<p id="Sample"></p>
</body>
</html> 출력
이것은 다음과 같은 출력을 생성합니다 -

"하단 너비 변경" 버튼을 클릭하면 -
