(Translated by https://www.hiragana.jp/)
Template:Div col - Wikipedia コンテンツにスキップ

Template:Div col

半永久的に拡張半保護されているテンプレート
ブラウザのCSS3マルチカラムレイアウト対応たいおう
プロパティ IE Edge Firefox Safari Chrome Opera
column-width
column-count
≥ 10
(2012)
≥ 12
(2015)
≥ 1.5
(2005)
≥ 3
(2007)
≥ 1
(2008)
≥ 11.1
(2011)
columns ≥ 10
(2012)
≥ 12
(2015)
≥ 9
(2011)
≥ 3
(2007)
≥ 1
(2008)
≥ 11.1
(2011)
break-before
break-after
break-inside
≥ 10
(2012)
≥ 12
(2015)
≥ 65
(2019)
≥ 10
(2016)
≥ 50
(2016)
≥ 11.1
(2011)

{{Div col}} は、{{div col end}} とともにもちいて、リスト(一覧いちらん)をだん表示ひょうじするテンプレートです。設定せっていちいさなフォントサイズで表示ひょうじできます。

使つかかた

引数ひきすう

|cols=
れつかず指定していします。既定きていは2です。18emまんにはなりません。
|colwidth=
れつはば指定していします。cols上書うわがきします。px, em, % といった単位たんいけます。
|small=
yes指定していすることで、フォントサイズをちいさく (90%) します。
|rules=
れつあいだ垂直すいちょくせんきます。yes指定していするか、あるいは、(1px dashed blue; のような)CSSのスタイルを指定していします。
|gap=
隣接りんせつしたれつ内容ないようあいだのスペースを指定していします。(ブラウザによって設定せっていされている)既定きていは1emです。
|style=
れつ適用てきようするCSSスタイル。

使用しようれい

なに指定していしないと、2れっか18emはばおおきいほうになります。

{{Div col}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}

表示ひょうじ

  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h

cols=省略しょうりゃくできます。

{{Div col|3}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}

表示ひょうじ

  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h

colwidth=省略しょうりゃくできます。だい引数ひきすうであることに注意ちゅういします。

{{Div col||10em}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}

表示ひょうじ

  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h

small=yes文字もじサイズがちいさくなります。

{{Div col|small=yes}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}

表示ひょうじ

  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h

rulesれい

{{Div col|rules=yes}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}

表示ひょうじ

  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h

gapれい

{{Div col|colwidth=10em|rules=yes|gap=2em}}
* a
* b
* c
* d
* e
* f
* g
* h
{{Div col end}}

表示ひょうじ

  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h

技術ぎじゅつてき詳細しょうさい

このテンプレートは以下いかCSSのプロパティに対応たいおうしたブラウザでマルチカラムを作成さくせいします。

{{Columns-list}}との相違そういてん

{{Columns-list}}には、<ul>...</ul><ol>...</ol>要素ようそmargin-top起因きいんしたレイアウトくず[ちゅう 1]への対策たいさく[ちゅう 2]がなされていますが、ほんテンプレートには同様どうよう対策たいさくおこなわれていません。

TemplateData

これはビジュアルエディターテンプレートウィザードにより使用しようされるテンプレートのためのTemplateData文書ぶんしょです。

Div col

Breaks a list into columns. It automatically breaks each column to an equal space, so you do not manually have to find the half way point on two columns. The list is provided by |content= or closed with {{div col end}}.

テンプレートパラメーター[テンプレートデータを編集へんしゅう]

パラメーター説明せつめいかた状態じょうたい
colscols 1

Specifies the number of columns.

既定きてい
2
数値すうち推奨すいしょう
colwidthcolwidth 2

Specifies the width of columns, and determines dynamically the number of columns based on screen width; more columns will be shown on wider displays. This overrides the 'cols' setting.

文字もじれつ省略しょうりゃく可能かのう
rulesrules

Produces vertical rules between the columns if set to yes.

文字もじれつ省略しょうりゃく可能かのう
gapgap

Specifies the space between the content of adjacent columns.

文字もじれつ省略しょうりゃく可能かのう
stylestyle

Specifies any custom styling.

文字もじれつ省略しょうりゃく可能かのう
contentcontent

Specifies the content.

文字もじれつ省略しょうりゃく可能かのう

関連かんれん項目こうもく

だんみテンプレート

Yes 可能かのう No 不可能ふかのう
テンプレートぐん 種類しゅるい
ウィキテーブルコード
処理しょりdagger
レスポンシブ・デザイン
モバイル対応たいおう
最初さいしょ だんぐみ 最後さいご
"Col" Table Yes No {{Col-begin}}
または{{Col-begin-small}}
{{Col-break}}
{{Col-2}} .. {{Col-5}}
{{Col-end}}
"Columns" Table No No {{Columns}}
"Multicol" Table Yes Yes {{Multicol}} {{Multicol-break}} {{Multicol-end}}
"Col-float" CSS float Yes Yes {{Col-float}} {{Col-float-break}} {{Col-float-end}}
"Columns-start" CSS float Yes Yes {{Columns-start}} {{Column}} {{Columns-end}}
"Div col" CSS columns Yes Yes {{Div col}} {{No col break}}(引数ひきすう内容ないよう分割ぶんかつさせない指定してい {{Div col end}}
"Columns-list" CSS columns No Yes {{Columns-list}}
"Flexbox"double-dagger CSS Flexbox英語えいごばん No Yes {{Flexbox}} {{Flex-item}}
{{Flex-item start}} .. {{Flex-item end}}
"Flexbox start"double-dagger CSS Flexbox Yes Yes {{Flexbox start}} {{Flexbox end}}
dagger ウィキマークアップ(Help:ページの編集へんしゅう#マークアップ英語えいごばん) ({| | || |- |}) を使つかったおもて作成さくせい処理しょり出来できるかどうか。処理しょり出来できない場合ばあいは、{{(!}}, {{!}}, {{!!}}, {{!-}}, {{!)}}などの要素ようそ、または、HTMLタグ (<table>...</table>, <tr>...</tr>など) を使用しようする必要ひつようがあります。
double-dagger Flexboxテンプレートは、セクションやひょう左右さゆうならべるといっただんてき表示ひょうじ使用しようすることができます。CSS columnsを使用しようするテンプレート同様どうよう複数ふくすう画面がめんはば対応たいおうしたレイアウトてきしています。

注釈ちゅうしゃく

  1. ^ この現象げんしょうはデスクトップばんベクター外装がいそうなどで発生はっせいします。
  2. ^ Template‐ノート:Columns-list#1: margin-top関連かんれん」を参照さんしょう

外部がいぶリンク