CSS

列数 | column-count

列计数

column-countCSS属性描述元素的列数。

/* <integer> value */ column-count: 3; /* Keyword value */ column-count: auto; /* Global values */ column-count: inherit; column-count: initial; column-count: unset;

Initial valueauto
应用对象Block containers except table wrapper boxes
是否可继承no
媒体visual
计算值as specified
动画类型an integer
规范顺序per grammar

语法

auto是一个关键字,用来表示由其他CSS属性指定

形式语法

<integer> | auto

实例

.content-box { border: 10px solid #000000; column-count: 3; }

规范

SpecificationStatusComment
CSS Multi-column Layout ModuleThe definition of 'column-count' in that specification.Candidate RecommendationInitial definition

浏览器兼容性

FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support(Yes)-webkit 50.01(Yes)-webkit (Yes)1.5 (1.8)-moz 52 (52)21011.103.0 (522)-webkit
on display: table-caption(Yes)(Yes)37 (37)(Yes)(Yes)(Yes)

FeatureAndroidAndroid WebviewEdgeFirefox Mobile (Gecko)IE PhoneOpera MobileSafari MobileChrome for Android
Basic support(Yes)(Yes) 50.01(Yes)-webkit (Yes)1.0 (1.8)-moz 52.0 (52)2(Yes)(Yes)(Yes)? 50.01
on display: table-caption(Yes)?(Yes)37.0 (37)(Yes)(Yes)(Yes)?