column-rule-color
CSS
property sets the color 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.
/* <color> values */ column-rule-color: red; column-rule-color: rgb(192, 56, 78); column-rule-color: transparent; column-rule-color: hsla(0, 100%, 50%, 0.6); /* Global values */ column-rule-color: inherit; column-rule-color: initial; column-rule-color: unset;
column-rule-color
property is specified as a single
<color>
值。
<color>
The color of the rule that separates columns.
| 初始值 |
currentcolor
|
|---|---|
| 适用于 | multicol elements |
| 继承 | no |
| 计算值 | computed color |
| 动画类型 | a color |
<color>where
<color> = <rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>where
<rgb()> = rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )
<rgba()> = rgba( <percentage>{3} [ / <alpha-value> ]? ) | rgba( <number>{3} [ / <alpha-value> ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )
<hsl()> = hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsl( <hue>, <percentage>, <percentage>, <alpha-value>? )
<hsla()> = hsla( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsla( <hue>, <percentage>, <percentage>, <alpha-value>? )where
<alpha-value> = <number> | <percentage>
<hue> = <number> | <angle>
<p>This is a bunch of text split into three columns. The `column-rule-color` property is used to change the color of the line that is drawn between columns. Don't you think that's wonderful?</p>
p {
column-count: 3;
column-rule-style: solid;
column-rule-color: blue;
}
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS Multi-column Layout Module
The definition of 'column-rule-color' in that specification. |
工作草案 | 初始定义。 |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
column-rule-color
|
Chrome 完整支持 50 | Edge 完整支持 12 |
Firefox
完整支持
52
|
IE 完整支持 10 | Opera 完整支持 11.1 | Safari 完整支持 9 | WebView Android 完整支持 50 | Chrome Android 完整支持 50 |
Firefox Android
完整支持
52
|
Opera Android 完整支持 11.1 | Safari iOS 完整支持 9 | Samsung Internet Android 完整支持 5.0 |
完整支持
要求使用供应商前缀或不同名称。
<color>
data type
color
,
background-color
,
border-color
,
outline-color
,
text-decoration-color
,
text-emphasis-color
,
text-shadow
,和
caret-color
column-count
column-fill
column-rule
column-rule-color
column-rule-style
column-rule-width
column-span
column-width
columns