スタイル列プロパティ
例
テキストを3つの列に分割し、それぞれ最低100ピクセルにします。
document.getElementById("myDIV").style.columns = "100px 3";
定義と使用法
columnsプロパティは、columnWidthとcolumnCountを設定するための省略形のプロパティです。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
columns | 50.0 | 10.0 | 52.0 | 10.0 | 37.0 |
構文
columnsプロパティを返します。
object.style.columns
columnsプロパティを設定します。
object.style.columns = "auto|column-width column-count|initial|inherit"
プロパティ値
Value | Description |
---|---|
auto | Default value. Sets both the column width to "auto" and the column-count to "auto" |
columnWidth | The width of the columns |
columnCount | The number of columns |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | 車車 |
---|---|
戻り値: | 要素のcolumnsプロパティを表す文字列 |
CSSバージョン | CSS3 |
関連ページ
CSS3チュートリアル:CSS3複数列
CSSリファレンス:columnsプロパティ
❮スタイルオブジェクト