CSS3多列布局

2019-03-31  本文已影响0人  Xara_
  1. columns属性是一个复合属性——列宽(column-width)和列数(column-count),可以同时定义多列的列数和每列的列宽。
    columns: <column-width> || <column-count>
  1. column-width属性类似于给列定义一个最小宽度(min-width)。
    column-width: auto | <length>
  1. column-count属性主要用来给元素指定想要的列数和允许的最大列数。
    column-count: auto | <integer>
  1. column-gap属性类似于盒模型中的margin一样,主要用来设置元素分列的列间距,其只能设置列与列之间的间距。
    column-gap: normal | <length>
  1. column-rule属性主要是用来定义列与列之间的边框宽度、边框样式和边框颜色,有些类似于常用的border属性,但column-rule是不占用任何空间位置的,在列与列之间改变其宽度不会改变任何列的位置。
    column-rule: <column-rule-width> | <column-rule-style> | <column-rule-color>
  1. column-span属性主要用来定义一个分列元素中的子元素能跨多少列,有时需要一段内容或一个标题不进行分列,也就是横跨所有列,就可以用该属性实现。
    column-span: none | all
  1. column-fill属性主要用来定义多列种每一列的高度是否统一。
    column-fill: auto | balance
上一篇 下一篇

猜你喜欢

热点阅读