The following code describes the authoring specification using 3 columns, which includes the browser prefix
The code is as follows |
Copy Code |
#columns-3 { text-align:justify; -moz-column-count:3; -moz-column-gap:12px; -moz-column-rule:1px solid #c4c8cc; -webkit-column-count:3; -webkit-column-gap:12px; -webkit-column-rule:1px solid #c4c8cc;
|
Complete example
The code is as follows |
Copy Code |
<! DOCTYPE html> <meta charset= "UTF-8" > <meta charset= "Utf-8" > <TITLE>CSS Columns Sample page-Q </title> <style> body{font:14px/1.5 Georgia,serif,sans-serif;} p{margin:0;padding:5px 10px;background: #eee;} h1{margin:10px 0;font-size:16px;} . test{ width:628px; border:10px solid #000; -moz-columns:200px 3; -webkit-columns:200px 3; columns:200px 3; } . test2{ border:10px solid #000; -moz-columns:200px; -webkit-columns:200px; columns:200px; } </style> <body> <div class= "Test" > <p>this module describes multi-column layout in CSS. By using Functionality described in this document, style sheets can declare that The content of an has the element is laid out in multiple columns. </p> <p>on the Web, tables have also been used to describe multi-column Layouts. The main benefit of the using css-based columns is flexibility; Content can flow from one column to another, and the number of columns Can vary depending on the size of the viewport. removing presentation Table markup from documents allows them to more easily is presented on Various output devices including speech synthesizers and small mobile Devices.</p> </div> <div class= "Test2" > <p>this module describes multi-column layout in CSS. By using Functionality described in this document, style sheets can declare that The content of an has the element is laid out in multiple columns. </p> <p>on the Web, tables have also been used to describe multi-column Layouts. The main benefit of the using css-based columns is flexibility; Content can flow from one column to another, and the number of columns Can vary depending on the size of the viewport. removing presentation Table markup from documents allows them to more easily is presented on Various output devices including speech synthesizers and small mobile Devices.</p> </div> </body> |