大网数据广告活动
Web 标准与前端开发

column-rule-style

· 52CE 我爱测

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

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

CSS Demo: column-rule-style

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;
}

语法

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

形式定义

形式语法

示例

设置虚线条列规则

HTML

<p>
  这段文本由三列组成,使用 <code>column-rule-style</code>
  属性来更改列之间线条的样式。这难道不奇妙吗?
</p>

CSS

p {
  column-count: 3;
  column-rule-style: dashed;
}

结果

设置虚线条列规则

规范

浏览器兼容性

参见

  • 多列布局
  • column-rule
  • column-rule-width
  • column-rule-color

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。