css3 column-rule usage
css3 column-rule usage:
The column-rule attribute is used to specify the border style between columns, which is somewhat similar to the border attribute. But unlike border, it only acts on the position between two columns and does not occupy any space.
Syntax structure:
column-rule:<column-rule-width> || <column-rule-style> || <column-rule-color>
This attribute is a composite attribute.
Parameter analysis:
(1).column-rule-width: Specifies the width of the border, the default value is "medium".
(2).column-rule-style: Specifies the style of the border , its default value is "none".
(3).column-rule-color: Specifies the color of the border. Its default value is the value of the foreground color, which can be set to transparent.
Browser support:
(1). IE10 and above browsers support this attribute.
(2) Google Chrome supports this attribute.
(4) ). Opera browser supports this attribute.
(5) Safari browser supports this attribute.
Special note:
Firefox browser needs to add -moz- prefix. The Safari browser needs to add the -webkit- prefix.
Code example:
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="author" content="http://ipnx.cn/" /> <title>php中文網(wǎng)</title> <style type="text/css"> .columns { border: 1px solid green; width: 600px; margin: 20px auto; -webkit-column-count:2; -moz-column-count:2; column-count:2; -moz-column-rule: 2px solid blue; -webkit-column-rule: 2px solid blue; column-rule: 2px solid blue; } </style> </head> <body> <div class="columns"> 互聯(lián)網(wǎng)的出現(xiàn),極大的促進(jìn)了信息的交流,隨著步伐的前進(jìn),網(wǎng)站的交互需求越來(lái)越多,但是受限于當(dāng)時(shí)的軟硬件條件, 特別是網(wǎng)絡(luò)環(huán)境的限制,非常簡(jiǎn)單的表單驗(yàn)證都要花費(fèi)大量的時(shí)間在服務(wù)器與客戶端之間進(jìn)行傳輸, 后來(lái)改名為JavaScript。隨著JavaScript在互聯(lián)網(wǎng)上的成功運(yùn)用,微軟公司也隨之開發(fā)了自己的"JavaScript"名叫JScript, 于是在互聯(lián)網(wǎng)上就出現(xiàn)多種標(biāo)準(zhǔn)的"JavaScript"腳本語(yǔ)言,如果任其發(fā)展下去,那么將會(huì)嚴(yán)重影響互聯(lián)網(wǎng)發(fā)展, 于是標(biāo)準(zhǔn)化迫在眉睫。最后JavaScript被提交給提交給歐洲計(jì)算機(jī)制造商協(xié)會(huì)(ECMA), 并最終推出了ECMA-262標(biāo)準(zhǔn),定義了名為ECMAScript的腳本語(yǔ)言,從此以后瀏覽器都將ECMAScript作為JavaScript的實(shí)現(xiàn)基礎(chǔ)。 </div> </body> </html>
The above code sets the related style of the border between two columns.
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="author" content="http://ipnx.cn/" /> <title>php中文網(wǎng)</title> <style type="text/css"> .columns { border: 1px solid green; width: 600px; margin: 20px auto; -webkit-column-count:2; -moz-column-count:2; column-count:2; -moz-column-rule: 40px solid blue; -webkit-column-rule: 40px solid blue; column-rule: 40px solid blue; } </style> </head> <body> <div class="columns"> 互聯(lián)網(wǎng)的出現(xiàn),極大的促進(jìn)了信息的交流,隨著步伐的前進(jìn),網(wǎng)站的交互需求越來(lái)越多,但是受限于當(dāng)時(shí)的軟硬件條件, 特別是網(wǎng)絡(luò)環(huán)境的限制,非常簡(jiǎn)單的表單驗(yàn)證都要花費(fèi)大量的時(shí)間在服務(wù)器與客戶端之間進(jìn)行傳輸, 后來(lái)改名為JavaScript。隨著JavaScript在互聯(lián)網(wǎng)上的成功運(yùn)用,微軟公司也隨之開發(fā)了自己的"JavaScript"名叫JScript, 于是在互聯(lián)網(wǎng)上就出現(xiàn)多種標(biāo)準(zhǔn)的"JavaScript"腳本語(yǔ)言,如果任其發(fā)展下去,那么將會(huì)嚴(yán)重影響互聯(lián)網(wǎng)發(fā)展, 于是標(biāo)準(zhǔn)化迫在眉睫。最后JavaScript被提交給提交給歐洲計(jì)算機(jī)制造商協(xié)會(huì)(ECMA), 并最終推出了ECMA-262標(biāo)準(zhǔn),定義了名為ECMAScript的腳本語(yǔ)言,從此以后瀏覽器都將ECMAScript作為JavaScript的實(shí)現(xiàn)基礎(chǔ)。 </div> </body> </html>
This border does not occupy any space. , can also be expanded to both ends at will, and other related properties will not be changed
.