diff options
Diffstat (limited to 'files/zh-cn/web/css/column-count/index.html')
-rw-r--r-- | files/zh-cn/web/css/column-count/index.html | 138 |
1 files changed, 138 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/column-count/index.html b/files/zh-cn/web/css/column-count/index.html new file mode 100644 index 0000000000..76d558975a --- /dev/null +++ b/files/zh-cn/web/css/column-count/index.html @@ -0,0 +1,138 @@ +--- +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> + +<div>{{CompatibilityTable}}</div> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari (WebKit)</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{CompatVersionUnknown}}{{property_prefix('-webkit')}}</td> + <td>{{compatGeckoDesktop("1.8")}}{{property_prefix('-moz')}}</td> + <td>10</td> + <td>11.1</td> + <td>3.0 (522){{property_prefix('-webkit')}}</td> + </tr> + <tr> + <td>on <code>display:</code> <code>table-caption</code></td> + <td>{{CompatVersionUnknown}}</td> + <td>{{compatGeckoDesktop("37")}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Phone</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{compatGeckoMobile("1.8")}}{{property_prefix('-moz')}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + <tr> + <td>on <code>display:</code> <code>table-caption</code></td> + <td>{{CompatVersionUnknown}}</td> + <td>{{compatGeckoMobile("37")}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + </tbody> +</table> + +<p> </p> + +<h4 id="了解更多">了解更多</h4> + +<p><a href="https://www.w3.org/TR/css3-multicol/">https://www.w3.org/TR/css3-multicol/</a></p> + +<p><a href="https://caniuse.com/#search=column">https://caniuse.com/#search=column</a></p> + +<p> </p> +</div> |