column-rule-style

column-rule-style CSS 属性设置多列布局中列之间绘制的线条的样式。

尝试一下

语法

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 定义的关键字,用于描述规则的样式,样式必须按照合并边框模型进行解释。

形式定义

初始值none
适用元素multicol elements
是否是继承属性
计算值as specified
Animation typediscrete

形式语法

column-rule-style = 
<line-style>

<line-style> =
none |
hidden |
dotted |
dashed |
solid |
double |
groove |
ridge |
inset |
outset

示例

设置虚线条列规则

HTML

html
<p>
  这段文本由三列组成,使用 <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

浏览器兼容性

BCD tables only load in the browser

参见