From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/css/column-span/index.html | 136 +++++++++++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 files/zh-cn/web/css/column-span/index.html (limited to 'files/zh-cn/web/css/column-span') 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 +--- +
{{ CSSRef("CSS Multi-columns") }}
+ +

概述

+ +

CSS 属性column-span 的值被设置为all时,可以让一个元素跨越所有的列。一个跨越多列的元素被称为spanning element。

+ +

{{cssinfo}}

+ +

语法

+ +
Formal syntax: {{csssyntax("column-span")}}
+
+ +
column-span: none;
+column-span: all;
+
+column-span: inherit;
+
+ +

取值

+ +
+
none
+
元素不跨多个列。
+
all
+
元素横跨所有列。元素出现之前,出现在元素之前的正常流中的内容在所有列之间自动平衡。该元素建立一个新的块格式上下文。
+
+ +

例子

+ +

下例中的 h2 元素横跨 article 元素中的各列

+ +

 

+ +

HTML

+ +
<article>
+  <h2>My Very Special Columns</h2>
+  <p>This is a bunch of text split into three columns
+     using the CSS `columns` property. The text
+     is equally distributed over the columns.</p>
+</article>
+
+ +

CSS

+ +
article {
+  columns: 3;
+}
+
+h2 {
+  column-span: all;
+}
+
+ +

Result

+ +

{{EmbedLiveSample('Example', 'auto', 120)}}

+ +

 

+ +

规范

+ + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{ SpecName('CSS3 Multicol', '#column-span0', 'column-width') }}{{ Spec2('CSS3 Multicol') }} 
+ +

浏览器兼容性

+ +

{{ CompatibilityTable() }}

+ +
+ + + + + + + + + + + + + + + + + + + +
FeatureChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support{{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }}{{ CompatNo() }}1011.1+{{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }}
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }}{{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }}{{ CompatNo() }}{{ CompatUnknown() }}11.1+{{ CompatVersionUnknown() }}{{ property_prefix('-webkit') }}
+
-- cgit v1.2.3-54-g00ecf