aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/column-span
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/css/column-span
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/css/column-span')
-rw-r--r--files/zh-cn/web/css/column-span/index.html136
1 files changed, 136 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/column-span/index.html b/files/zh-cn/web/css/column-span/index.html
new file mode 100644
index 0000000000..1f24023c88
--- /dev/null
+++ b/files/zh-cn/web/css/column-span/index.html
@@ -0,0 +1,136 @@
+---
+title: column-span
+slug: Web/CSS/column-span
+translation_of: Web/CSS/column-span
+---
+<div>{{ CSSRef("CSS Multi-columns") }}</div>
+
+<h2 id="Summary" name="Summary">概述</h2>
+
+<p><a href="/en-US/docs/CSS" title="/en-US/docs/CSS">CSS</a> 属性<code>column-span</code> 的值被设置为<code>all</code>时,可以让一个元素跨越所有的列。一个跨越多列的元素被称为<strong>spanning element。</strong></p>
+
+<p>{{cssinfo}}</p>
+
+<h2 id="Syntax" name="Syntax">语法</h2>
+
+<pre class="twopartsyntaxbox"><a href="/en-US/docs/CSS/Value_definition_syntax" title="CSS/Value_definition_syntax">Formal syntax</a>: {{csssyntax("column-span")}}
+</pre>
+
+<pre>column-span: none;
+column-span: all;
+
+column-span: inherit;
+</pre>
+
+<h3 id="取值">取值</h3>
+
+<dl>
+ <dt><code>none</code></dt>
+ <dd>元素不跨多个列。</dd>
+ <dt><code>all</code></dt>
+ <dd>元素横跨所有列。元素出现之前,出现在元素之前的正常流中的内容在所有列之间自动平衡。该元素建立一个新的块格式上下文。</dd>
+</dl>
+
+<h2 id="Examples" name="Examples">例子</h2>
+
+<p>下例中的 h2 元素横跨 article 元素中的各列</p>
+
+<p> </p>
+
+<h3 id="HTML">HTML</h3>
+
+<pre>&lt;article&gt;
+ &lt;h2&gt;My Very Special Columns&lt;/h2&gt;
+ &lt;p&gt;This is a bunch of text split into three columns
+ using the CSS `columns` property. The text
+ is equally distributed over the columns.&lt;/p&gt;
+&lt;/article&gt;
+</pre>
+
+<h3 id="CSS">CSS</h3>
+
+<pre>article {
+ columns: 3;
+}
+
+h2 {
+ column-span: all;
+}
+</pre>
+
+<h3 id="Result">Result</h3>
+
+<p>{{EmbedLiveSample('Example', 'auto', 120)}}</p>
+
+<p> </p>
+
+<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-span0', 'column-width') }}</td>
+ <td>{{ Spec2('CSS3 Multicol') }}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">浏览器兼容性</h2>
+
+<p>{{ CompatibilityTable() }}</p>
+
+<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>{{ CompatNo() }}</td>
+ <td>10</td>
+ <td>11.1+</td>
+ <td>{{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }}</td>
+ <td>{{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>11.1+</td>
+ <td>{{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }}</td>
+ </tr>
+ </tbody>
+</table>
+</div>