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/ja/web/css/column-span/index.html | 117 ++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 files/ja/web/css/column-span/index.html (limited to 'files/ja/web/css/column-span') diff --git a/files/ja/web/css/column-span/index.html b/files/ja/web/css/column-span/index.html new file mode 100644 index 0000000000..63a153b5c6 --- /dev/null +++ b/files/ja/web/css/column-span/index.html @@ -0,0 +1,117 @@ +--- +title: column-span +slug: Web/CSS/column-span +tags: + - CSS + - CSS Multi-column Layout + - CSS Property + - Reference + - 'recipe:css-property' +translation_of: Web/CSS/column-span +--- +
{{CSSRef}}
+ +

column-spanCSS のプロパティで、値に all を設定した場合、段組みレイアウトで要素をすべての段にまたがらせることができます。

+ +
{{EmbedInteractiveExample("pages/css/column-span.html")}}
+ +
/* キーワード値 */
+column-span: none;
+column-span: all;
+
+/* グローバル値 */
+column-span: inherit;
+column-span: initial;
+column-span: unset;
+
+ +

複数の段にまたがる要素は、スパニング要素 (spanning element) と呼びます。

+ +

構文

+ +

column-span プロパティは以下に挙げたキーワード値のうちの一つで指定します。

+ +

+ +
+
none
+
この要素は複数の段にまたがりません。
+
all
+
この要素がすべての段にまたがります。この要素よりも前に現れた通常フローのコンテンツは、自動的にすべての段で均等になります。この要素は新しいブロック整形コンテキストを生成します。
+
+ +

公式定義

+ +

{{cssinfo}}

+ +

形式文法

+ +
{{csssyntax}}
+ +

+ +

段をまたぐ見出しの設定

+ +

この例では、見出しが記事のすべての段にまたがって作成されます。

+ +

HTML

+ +
<article>
+  <h2>Header spanning all of the columns</h2>
+  <p>
+     The h2 should span all the columns. The rest
+     of the text should be distributed among the columns.
+  </p>
+  <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>
+  <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>
+  <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>
+  <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;
+}
+
+ +

結果

+ +

{{EmbedLiveSample('Making_a_heading_span_columns', 'auto', 260)}}

+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('CSS3 Multicol', '#column-span', 'column-span')}}{{Spec2('CSS3 Multicol')}}初回定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("css.properties.column-span")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf