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/columns/index.html | 103 ++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 files/ja/web/css/columns/index.html (limited to 'files/ja/web/css/columns') diff --git a/files/ja/web/css/columns/index.html b/files/ja/web/css/columns/index.html new file mode 100644 index 0000000000..6f01f3ac59 --- /dev/null +++ b/files/ja/web/css/columns/index.html @@ -0,0 +1,103 @@ +--- +title: columns +slug: Web/CSS/columns +tags: + - CSS + - CSS Property + - CSS 段組みレイアウト + - Reference + - 一括指定プロパティ + - 段組み +translation_of: Web/CSS/columns +--- +
{{CSSRef}}
+ +

CSScolumns プロパティは、段組みされた要素の段の幅や段数を設定します。

+ +
{{EmbedInteractiveExample("pages/css/columns.html")}}
+ + + +

これは {{cssxref('column-width')}} と {{cssxref("column-count")}} の両方を一度に便利に宣言できる一括指定プロパティです。他の一括指定プロパティと同様に、指定されなかった個別の値は初期値が設定されます。

+ +

構文

+ +
/* 段の幅 */
+columns: 18em;
+
+/* 段数 */
+columns: auto;
+columns: 2;
+
+/* 段の幅と段数の両方 */
+columns: 2 auto;
+columns: auto 12em;
+columns: auto auto;
+
+/* グローバル値 */
+columns: inherit;
+columns: initial;
+columns: unset;
+ +

columns プロパティは以下に挙げる値を1つまたは2つで、順不同で指定します。

+ +

+ +
+
<'column-width'>
+
{{cssxref("<length>")}} 値または auto キーワードで、段の幅を最適化するヒントになります。実際の段の幅はより広くなったり(余白を埋めるため)、より狭くなったり(利用可能なスペースが指定された段の幅よりも小さい場合のみ)します。この値は正の数だけで、そうでなければ宣言は無効になります。
+
<'column-count'>
+
正の {{cssxref("<integer>")}} のみで、要素の中で流れる理想的な段数を記述します。 {{cssxref("column-width")}} が auto 以外の値で一緒に設定された場合は、最大の段数を示します。
+
+ +

構文形式

+ +
{{csssyntax}}
+ +

+ +

HTML

+ +
<p class="content-box">
+  This is a bunch of text split into three columns
+  using the CSS `columns` property. The text
+  is equally distributed over the columns.
+</p>
+
+ +

CSS

+ +
.content-box {
+  columns: 3 auto;
+}
+ +

結果

+ +

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

+ +

仕様策定状況

+ + + + + + + + + + + + + + + + +
仕様書策定状況コメント
{{SpecName('CSS3 Multicol', '#columns', 'columns')}}{{Spec2('CSS3 Multicol')}}初回定義。
+ +

{{cssinfo}}

+ +

ブラウザーの対応

+ + + +

{{Compat("css.properties.columns")}}

-- cgit v1.2.3-54-g00ecf