スタイルcolumnCountプロパティ
例
div要素のテキストを3つの列に分割します。
document.getElementById("myDIV").style.columnCount = 3;
定義と使用法
columnCountプロパティは、要素を分割する列の数を指定します。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
columnCount | 50.0 | 10.0 | 52.0 | 10.0 | 37.0 |
構文
columnCountプロパティを返します。
object.style.columnCount
columnCountプロパティを設定します。
object.style.columnCount = "number|auto|initial|inherit"
プロパティ値
Value | Description |
---|---|
number | The optimal number of columns into which the content of the element will be flowed |
auto | Default value. The number of columns will be determined by other properties, like e.g. "column-width" |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | 自動 |
---|---|
戻り値: | 要素のcolumn-countプロパティを表す文字列 |
CSSバージョン | CSS3 |
関連ページ
CSS3チュートリアル:CSS3複数列
CSSリファレンス:column-countプロパティ
❮スタイルオブジェクト