Style columnWidth 屬性
實例
改變列的寬度:
document.getElementById("myDIV").style.columnWidth="100px";
定義和用法
columnWidth 屬性規定列的寬度。
流覽器支持
Internet Explorer 10 和 Opera 支持 columnWidth 屬性。
Firefox 支持另一個可替代該屬性的屬性,即 MozColumnWidth 屬性。
Safari 和 Chrome 支持另一個可替代該屬性的屬性,即 WebkitColumnWidth 屬性。
語法
返回 columnWidth 屬性:
object.style.columnWidth
設置 columnWidth 屬性:
object.style.columnWidth="auto|length|initial|inherit"
屬性值
值 | 描述 |
---|---|
auto | 默認值。列的寬度由流覽器決定。 |
length | 一個規定列寬度的長度。 |
initial | 設置該屬性為它的默認值。請參閱 initial。 |
inherit | 從父元素繼承該屬性。請參閱 inherit。 |
技術細節
默認值: | auto |
---|---|
返回值: | 字串,表示元素的 column-width 屬性。 |
CSS 版本 | CSS3 |
相關文章
CSS3 教學:CSS3 多列
CSS 參考手冊:column-width 屬性