blob: 5047f3c7eb1e07df8ec39ccb1b7146a766684942 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
---
title: column-count
slug: Web/CSS/column-count
tags:
- CSS3 Multiple column layout
- CSS3多列布局
translation_of: Web/CSS/column-count
---
<div>{{CSSRef}}</div>
<div> </div>
<p><strong>column-count </strong>CSS属性,描述元素的列数。</p>
<pre><code>column-count: 3;
column-count: auto;
column-count: inherit;
column-count: initial;
column-count: unset;</code></pre>
<h2 id="Syntax" name="Syntax">语法</h2>
<p>{{cssinfo}}</p>
<h3 id="取值">取值</h3>
<dl>
<dt><code>auto</code></dt>
<dd>用来表示列的数量由其他CSS属性指定, 例如 {{cssxref("column-width")}}.</dd>
<dt><code><number></code></dt>
<dd>是个严格的正数 {{cssxref("<integer>")}} ,用来描述元素内容被划分的理想列数. 假如 {{cssxref("column-width")}}也被设置为非零值, 此参数仅表示所允许的最大列数. </dd>
</dl>
<h2 id="Examples" name="Examples">例子</h2>
<pre class="brush: css">.content-box {
border: 10px solid #000000;
column-count:3;
}
</pre>
<h2 id="Specifications" name="Specifications">规范</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('CSS3 Multicol', '#column-count', 'column-count')}}</td>
<td>{{Spec2('CSS3 Multicol')}}</td>
<td> </td>
</tr>
</tbody>
</table>
<p> </p>
<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容性</h2>
{{Compat("css.properties.column-count")}}
|