borderBottom 속성은 아래쪽 테두리 속성을 설정하거나 가져오는 데 사용됩니다. border-bottom 속성은 border-bottom-width, border-bottom-style, border-bottom-color의 약칭입니다.
구문
다음은 −
의 구문입니다.borderBottom 속성 설정 -
object.style.borderBottom = "width style color|initial|inherit"
값
다음은 위의 속성 값입니다 -
| Sr.No | 매개변수 및 설명 |
|---|---|
| 1 | 너비 하단 테두리 너비를 설정합니다. |
| 2 | 스타일 하단 테두리 스타일을 설정합니다. |
| 3 | 색상 하단 테두리 색상을 설정합니다. |
| 4 | 초기 이 속성을 초기 값으로 설정합니다. |
| 5 | 상속 상위 속성 값을 상속합니다. |
예시
borderBottom 속성의 예를 살펴보겠습니다 -
<!DOCTYPE html>
<html>
<head>
<style>
#IMG1 {
border-bottom: 7px solid orange;
box-shadow: 2px 2px 4px 1px seagreen;
}
</style>
<script>
function changeBorder(){
document.getElementById("IMG1").style.borderBottom="10px dotted pink";
document.getElementById("Sample").innerHTML="The bottom border for the image is now changed";
}
</script>
</head>
<body>
<h2>Kotlin Tutorial</h2>
<img id="IMG1" src="https://www.tutorialspoint.com/kotlin/images/kotlin.jpg">
<p>Change the above image below border by clicking the below button</p>
<button onclick="changeBorder()">Change Bottom Border</button>
<p id="Sample"></p>
</body>
</html> 출력
이것은 다음과 같은 출력을 생성합니다 -

"하단 테두리 변경" 버튼을 클릭하면 -
