HTML DOM Style columnGap property
Examples
Predetermined spacing between columns is 40 pixels:
document.getElementById("myDIV").style.columnGap="50px";
try it"
Definition and Usage
columnGap attribute specifies the spacing between columns.
Note: Setting the column-rule between columns if it appears in the middle of the interval.
Browser Support
Internet Explorer 10 and Opera support columnGap property.
Firefox supports another alternative of the property attribute that MozColumnGap property.
Safari and Chrome support another alternative of the property attribute that WebkitColumnGap property.
Note: Internet Explorer 9 and earlier versions do not support columnGap property.
grammar
Back columnGap properties:
object .style.columnGap
Setting columnGap properties:
object .style.columnGap="length|normal|initial|inherit"
Property Value
值 | 描述 |
---|---|
length | 把列之间的间隔设置为指定的长度。 |
normal | 默认值。规定列之间的间隔为一个常规的间隔。W3C 建议的值是 1em。 |
initial | 设置该属性为它的默认值。请参阅 initial 。 |
inherit | 从父元素继承该属性。请参阅 inherit 。 |
technical details
Defaults: | normal |
---|---|
return value: | String representing the column-gap property element. |
CSS version | CSS3 |
related articles
CSS3 tutorial: CSS3 multi-column
CSS Reference: column-GAP property