column-rule-width CSS property sets the width of the line drawn between columns in a multi-column layout.

The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.

句法

/* Keyword values */
column-rule-width: thin;
column-rule-width: medium;
column-rule-width: thick;
/* <length> values */
column-rule-width: 1px;
column-rule-width: 2.5em;
/* Global values */
column-rule-width: inherit;
column-rule-width: initial;
column-rule-width: unset;
					

column-rule-width property is specified as a single <'border-width'> 值。

<'border-width'>
Is a keyword defined by border-width describing the width of the rule. It may be either a <length> or one of the thin , medium ,或 thick keywords.

形式定义

初始值 medium
适用于 multicol elements
继承 no
计算值 the absolute length; 0 column-rule-style is none or hidden
动画类型 a length

形式句法

<'border-width'>
					

范例

Setting a thick column rule

HTML

<p>This is a bunch of text split into three columns.
   The `column-rule-width` property is used to change
   the width of the line that is drawn between columns.
   Don't you think that's wonderful?</p>
					

CSS

p {
  column-count: 3;
  column-rule-style: solid;
  column-rule-width: thick;
}
					

结果

规范

规范 状态 注释
CSS Multi-column Layout Module
The definition of 'column-rule-width' in that specification.
工作草案 初始定义。

浏览器兼容性

The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
column-rule-width Chrome 完整支持 50 Edge 完整支持 12 Firefox 完整支持 52
完整支持 52
不支持 3.5 — 74 Prefixed
Prefixed Implemented with the vendor prefix: -moz-
IE 完整支持 10 Opera 完整支持 11.1 Safari 完整支持 9 WebView Android 完整支持 50 Chrome Android 完整支持 50 Firefox Android 完整支持 52
完整支持 52
完整支持 4 Prefixed
Prefixed Implemented with the vendor prefix: -moz-
Opera Android 完整支持 11.1 Safari iOS 完整支持 9 Samsung Internet Android 完整支持 5.0

图例

完整支持

完整支持

要求使用供应商前缀或不同名称。

要求使用供应商前缀或不同名称。

元数据

  • 最后修改: