Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the column-rule-width attribute in css

Shulou Source: shulou.com Published: 2022-06-01 12:15:43 10月25日 Update

This article mainly shows you "how to use the column-rule-width attribute in css", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use the column-rule-width attribute in css" this article.

Definition and usage of csscolumn-rule-width attribute

In css, the column-rule-width attribute is used in multi-column layout elements to set the width of the split line between columns. It is usually used with column-count, column-rule-style and other multi-column layout properties. The prerequisite for using it is that the multi-column layout is defined through column-count, column and other attributes, and the split style between columns is set (for example, the column-rule-style attribute defines the split line). Using the column-rule-width attribute alone has no effect.

Csscolumn-rule-width attribute syntax format

Css syntax: column-rule-width:thin/medium/thick/length; (example: column-rule-width:16px;)

JavaScript syntax: object.style.columnRuleWidth= "18px"

Csscolumn-rule-width attribute value description

Thin: thin separator

Medium: medium separation line

Thick: thick separator

Length: a separator line with custom width (e.g. 12px)

Case study

The css3column-rule-width property sets the width note of the split line between columns

Body {background:#ddd;} div {width:400px;border:1pxsolidblueviolet;margin-top:10px;:;}

.thin {column-count:3;column-rule-style:solid;column-rule-width:thin;}

.thick {column-count:3;column-rule-style:solid;column-rule-width:thick;}

.length {column-count:3;column-rule-style:solid;column-rule-width:8px;}

Column-rule-width:thin; demo, set up subdivision Secant. This is to demonstrate the effect of writing more.

Column-rule-width:thick; demo, set the thick split line. This is to demonstrate the effect of writing more.

Column-rule-width:8px;, sets the width of the split line to 8px. This is to demonstrate the effect of writing more.

The above is all the content of the article "how to use the column-rule-width attribute in css". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Properties split lines presentation width effects between content layout article grammar this is learning help elements premises Secant examples easy to understand more conditions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Linux macOS Microsoft vpn