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="//m.sbmmt.com/" /> <title>php中文网</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"> 互联网的出现,极大的促进了信息的交流,随着步伐的前进,网站的交互需求越来越多,但是受限于当时的软硬件条件, 特别是网络环境的限制,非常简单的表单验证都要花费大量的时间在服务器与客户端之间进行传输, 后来改名为JavaScript。随着JavaScript在互联网上的成功运用,微软公司也随之开发了自己的"JavaScript"名叫JScript, 于是在互联网上就出现多种标准的"JavaScript"脚本语言,如果任其发展下去,那么将会严重影响互联网发展, 于是标准化迫在眉睫。最后JavaScript被提交给提交给欧洲计算机制造商协会(ECMA), 并最终推出了ECMA-262标准,定义了名为ECMAScript的脚本语言,从此以后浏览器都将ECMAScript作为JavaScript的实现基础。 </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="//m.sbmmt.com/" /> <title>php中文网</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"> 互联网的出现,极大的促进了信息的交流,随着步伐的前进,网站的交互需求越来越多,但是受限于当时的软硬件条件, 特别是网络环境的限制,非常简单的表单验证都要花费大量的时间在服务器与客户端之间进行传输, 后来改名为JavaScript。随着JavaScript在互联网上的成功运用,微软公司也随之开发了自己的"JavaScript"名叫JScript, 于是在互联网上就出现多种标准的"JavaScript"脚本语言,如果任其发展下去,那么将会严重影响互联网发展, 于是标准化迫在眉睫。最后JavaScript被提交给提交给欧洲计算机制造商协会(ECMA), 并最终推出了ECMA-262标准,定义了名为ECMAScript的脚本语言,从此以后浏览器都将ECMAScript作为JavaScript的实现基础。 </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
.