column-rule-style
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2017.
column-rule-style
は CSS のプロパティで、段組みレイアウトで段の間に引かれる線(段間罫)のスタイルを設定します。
試してみましょう
column-rule-style: none;
column-rule-style: dotted;
column-rule-style: solid;
column-rule-style: double;
column-rule-style: ridge;
column-rule-color: #88f;
<section id="default-example">
<p id="example-element">
London. Michaelmas term lately over, and the Lord Chancellor sitting in
Lincoln's Inn Hall. Implacable November weather. As much mud in the streets
as if the waters had but newly retired from the face of the earth, and it
would not be wonderful to meet a Megalosaurus, forty feet long or so,
waddling like an elephantine lizard up Holborn Hill.
</p>
</section>
#example-element {
columns: 3;
column-rule: solid;
text-align: left;
}
構文
css
/* <'border-style'> の値 */
column-rule-style: none;
column-rule-style: hidden;
column-rule-style: dotted;
column-rule-style: dashed;
column-rule-style: solid;
column-rule-style: double;
column-rule-style: groove;
column-rule-style: ridge;
column-rule-style: inset;
column-rule-style: outset;
/* グローバル値 */
column-rule-style: inherit;
column-rule-style: initial;
column-rule-style: revert;
column-rule-style: revert-layer;
column-rule-style: unset;
column-rule-style
プロパティは、単一の <'border-style'>
値で指定します。
値
<'border-style'>
-
border-style
で定義されているキーワードで、段間罫のスタイルを指定します。スタイルは collasped の境界線モデルで解釈されます。
公式定義
初期値 | none |
---|---|
適用対象 | 段組み要素 |
継承 | なし |
計算値 | 指定通り |
アニメーションの種類 | 離散値 |
形式文法
column-rule-style =
<line-style-list> |
<auto-line-style-list>
<line-style-list> =
[ <line-style-or-repeat> ]+
<auto-line-style-list> =
[ <line-style-or-repeat> ]* <auto-repeat-line-style> [ <line-style-or-repeat> ]*
<line-style-or-repeat> =
<line-style> |
<repeat-line-style>
<auto-repeat-line-style> =
repeat( auto , [ <line-style> ]+ )
<line-style> =
none |
hidden |
dotted |
dashed |
solid |
double |
groove |
ridge |
inset |
outset
<repeat-line-style> =
repeat( [ <integer [1,∞]> ] , [ <line-style> ]+ )
例
破線の段間罫を設定
HTML
html
<p>
これは 3 つ段に分割されたテキストの束です。 <code>column-rule-style</code> プロパティは、段と段の間に引かれる線のスタイルを変更するために使用されます。すばらしいと思いませんか?
</p>
CSS
css
p {
column-count: 3;
column-rule-style: dashed;
}
結果
仕様書
Specification |
---|
CSS Multi-column Layout Module Level 1 # crs |