Latest web development tutorials

HTML DOM Style columnRule property

Style Object Reference Style Objects

Examples

A predetermined width, style, and color rules between columns:

document.getElementById("myDIV").style.columnRule="3px outset blue";

try it"

Definition and Usage

columnRule property is a shorthand property for setting all columnRule * properties.

columnRule properties set the width, style, and color rules between columns.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Internet Explorer 10 and Opera support columnRule property.

Firefox supports another alternative of the property attribute that MozColumnRule property.

Safari and Chrome support another alternative of the property attribute that WebkitColumnRule property.


grammar

Back columnRule properties:

object .style.columnRule

Setting columnRule properties:

object .style.columnRule="column-rule-width column-rule-style column-rule-color|initial|inherit"

Property Value

描述
columnRuleWidth 设置列之间的宽度规则。默认值是 medium。
columnRuleStyle 设置列之间的样式规则。默认值是 none。
columnRuleColor 设置列之间的颜色规则。默认值是元素的颜色。
initial 设置该属性为它的默认值。请参阅 initial
inherit 从父元素继承该属性。请参阅 inherit

technical details

Defaults: medium none color
return value: String representing the column-rule property element.
CSS version CSS3


related articles

CSS3 tutorial: CSS3 multi-column

CSS Reference: column-rule property


Style Object Reference Style Objects