HTML DOM columnRuleColor 속성은 열 사이의 규칙 색상을 설정하거나 반환하는 데 사용됩니다.
다음은 −
의 구문입니다.columnRuleColor 속성 설정 -
object.style.columnRuleColor = "color|initial|inherit"
여기서 color는 규칙의 색상을 지정합니다. Initial은 값을 기본값으로 설정하고 inherit는 상위 속성 값으로 설정합니다.
columnRuleColor 속성의 예를 살펴보겠습니다 -
예시
<!DOCTYPE html>
<html>
<head>
<style>
#DIV1{
padding: 5px;
column-count: 5;
column-rule-width: 9px;
column-rule-style: solid;
column-rule-color: lightcoral;
}
</style>
<script>
function changeColumnRuleColor(){
document.getElementById("DIV1").style.columnRuleColor="blue";
document.getElementById("Sample").innerHTML="The column rule color is now changed";
}
</script>
</head>
<body>
<div id="DIV1">
<img src="https://www.tutorialspoint.com/images/Swift.png"><br/>
<img src="https://www.tutorialspoint.com/images/xamarian.png"><br/>
<img src="https://www.tutorialspoint.com/images/pl-sql.png"><br/>
<img src="https://www.tutorialspoint.com/images/asp-net.png"><br/>
<img src="https://www.tutorialspoint.com/images/powerbi.png"><br/>
<img src="https://www.tutorialspoint.com/images/Tableau.png"><br/>
<img src="https://www.tutorialspoint.com/images/Big-Data-Analytics.png"><br/>
<img src="https://www.tutorialspoint.com/images/microsoftproject.png">
<img src="https://www.tutorialspoint.com/images/QlikView.png"><br/>
<img src="https://www.tutorialspoint.com/images/hadoop.png">
</div>
<p>Change the above div column rule color by clicking the below button</p>
<button onclick="changeColumnRuleColor()">Change Column Rule Color</button>
<p id="Sample"></p>
</body>
</html> 출력

'열 규칙 색상 변경' 클릭 시 버튼 -
