CSS列ルールプロパティ
例
列間のルールの幅、スタイル、および色を指定します。
div
{
column-rule: 4px double #ff00ff;
}
以下の「自分で試してみてください」の例をもっと見てください。
定義と使用法
このcolumn-rule
プロパティは、列間のルールの幅、スタイル、および色を設定します。
このプロパティは、次の略称プロパティです。
column-rule-colorを省略した場合、適用される色はテキストの色になります。
デフォルト値: | ミディアムなしカラー |
---|---|
遺伝性の: | いいえ |
アニメート可能: | はい、個々のプロパティを参照してください。アニメート可能について読む |
バージョン: | CSS3 |
JavaScript構文: | object .style.columnRule = "3px outset blue" |
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
数字の後に-webkit-または-moz-が続く場合は、プレフィックスを使用して機能した最初のバージョンを指定します。
Property | |||||
---|---|---|---|---|---|
column-rule | 50.0 4.0 -webkit- |
10.0 | 52.0 2.0 -moz- |
9.0 3.1 -webkit- |
37.0 15.0 -webkit 11.1 |
CSS構文
column-rule: column-rule-width column-rule-style column-rule-color|initial|inherit;
プロパティ値
Value | Description |
---|---|
column-rule-width | Sets the width of the rule between columns. Default value is medium |
column-rule-style | Sets the style of the rule between columns. Default value is none |
column-rule-color | Sets the color of the rule between columns. Default value is the color of the element |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
その他の例
例
<div>要素のテキストを3つの列に分割します。
div
{
column-count: 3;
}
例
列間に40ピクセルのギャップを指定します。
div
{
column-gap: 40px;
}
関連ページ
CSSチュートリアル:CSS複数列
HTML DOMリファレンス:columnRuleプロパティ