テンプレート:Div col/doc
<templatestyles></templatestyles>
これはTemplate:Div col、Template:Div col endの解説サブページです。 使用方法、カテゴリ、およびその他テンプレート自体に含まれない情報を収容しています。 |
テンプレート:CSS3 multiple column layout {{Div col}} は、{{div col end}} とともに用いて、リストを段組みで表示するテンプレートです。設定で小さなフォントサイズで表示できます。
使い方
引数
|cols=
- 列の数を指定します。既定値は2です。
- 非推奨。下の colwidth の方が閲覧環境に応じて柔軟に対応できるため。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のプロパティに対応したブラウザでマルチカラムを作成します。
- -moz-column-count(FirefoxなどのMozilla/Geckoを使用したブラウザ対応)
- -webkit-column-count(SafariなどのWebKitを使用したブラウザ対応)
- column-count(CSS3に対応しているブラウザ。CSS3 module: Multi-column layout参照)
TemplateData
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}}.
パラメーター | 説明 | 型 | 状態 | |
---|---|---|---|---|
cols | cols 1 | Specifies the number of columns.
| 数値 | 非推奨 |
colwidth | colwidth 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. | 文字列 | 省略可能 |
rules | rules | Produces vertical rules between the columns if set to yes. | 文字列 | 省略可能 |
gap | gap | Specifies the space between the content of adjacent columns. | 文字列 | 省略可能 |
style | style | Specifies any custom styling. | 文字列 | 省略可能 |
content | content | Specifies the content. | 文字列 | 省略可能 |