技术频道


CSS columns

CSS column


column-count CSS 属性,描述元素的列数。

column-gap 该 CSS 属性用来设置元素列之间的间隔 (gutter) 大小。

.three-column {
  padding: 1em;
  -moz-column-count: 3;
  -moz-column-gap: 1em;
  -webkit-column-count: 3;
  -webkit-column-gap: 1em;
  column-count: 3;
  column-gap: 1em;
}

CSS column Demo


<div class="three-column">

London. Michaelmas term lately over, and the Lord Chancellor sitting in Lincoln's Inn Hall. Implacable November weather. As much mud in the streets as if the waters had but newly retired from the face of the earth, and it would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill.

</div>
 
 

CSS column 布局扩展阅读:




发表评论