HTML DOM columnRuleWidth प्रॉपर्टी का उपयोग कॉलम नियम की चौड़ाई को सेट करने या प्राप्त करने के लिए किया जाता है।
−
. के लिए वाक्य रचना निम्नलिखित हैcolumnRuleWidth प्रॉपर्टी सेट करना -
object.style.columnRuleWidth = "medium|thin|thick|length|initial|inherit"
उपरोक्त संपत्ति मूल्यों को इस प्रकार समझाया गया है -
| मान वें> <वें>विवरण वें> | |
|---|---|
| पतला | यह एक पतला नियम निर्दिष्ट करता है। |
| मध्यम | यह माध्यम नियम को निर्दिष्ट करता है और डिफ़ॉल्ट मान है। |
| मोटा | यह एक पतला नियम निर्दिष्ट करता है। |
| लंबाई | इसका उपयोग लंबाई इकाइयों में नियम की चौड़ाई निर्दिष्ट करने के लिए किया जाता है। |
| प्रारंभिक | इस गुण को प्रारंभिक मान पर पूर्वनिर्धारित करना। |
| उत्तराधिकारी | मूल संपत्ति मान को विरासत में मिला |
आइए columnRuleWidth प्रॉपर्टी के लिए एक उदाहरण देखें -
उदाहरण
<!DOCTYPE html>
<html>
<head>
<style>
#DIV1{
padding: 5px;
column-count: 5;
column-rule-width: 9px;
column-rule-color: lightblue;
column-rule-style: solid;
}
</style>
<script>
function changeColumnRuleWidth(){
document.getElementById("DIV1").style.columnRuleWidth="3px";
document.getElementById("Sample").innerHTML="The column rule width is now reduced";
}
</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 width by clicking the below button</p>
<button onclick="changeColumnRuleWidth()">Change Column Rule Width</button>
<p id="Sample"></p>
</body>
</html> आउटपुट

“कॉलम नियम की चौड़ाई बदलें . पर क्लिक करने पर "बटन -
