スタイルflexFlowプロパティ
例
柔軟なアイテムを列に表示し、折り返しを行わないようにします。
document.getElementById("main").style.flexFlow = "column nowrap";
定義と使用法
flexFlowプロパティは、flexDirectionプロパティとflexWrapプロパティの省略形のプロパティです。
flexDirectionプロパティは、フレキシブルアイテムの方向を指定します。
flexWrapプロパティは、フレキシブルアイテムをラップするかどうかを指定します。
注:要素がフレキシブルアイテムでない場合、flexFlowプロパティは効果がありません。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
flexFlow | Yes | 11.0 | Yes | 9.0 | Yes |
構文
flexFlowプロパティを返します。
object.style.flexFlow
flexFlowプロパティを設定します。
object.style.flexFlow = "flex-direction flex-wrap|initial|inherit"
プロパティ値
Value | Description |
---|---|
flex-direction | Possible values: row row-reverse column column-reverse initial inherit Default value is "row". Specifying the direction of the flexible items |
flex-wrap | Possible values: nowrap wrap wrap-reverse initial inherit Default value is "nowrap". Specifying whether the flexible items should wrap or not |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | 行nowrap |
---|---|
戻り値: | 要素のフレックスフロープロパティを表す文字列 |
CSSバージョン | CSS3 |
関連ページ
CSSリファレンス:flex-flowプロパティ
HTML DOM STYLEリファレンス:flexプロパティ
HTML DOM STYLEリファレンス:flexBasisプロパティ
HTML DOM STYLEリファレンス:flexDirectionプロパティ
HTML DOM STYLEリファレンス:flexGrowプロパティ
HTML DOM STYLEリファレンス:flexShrinkプロパティ
HTML DOM STYLEリファレンス:flexWrapプロパティ
❮スタイルオブジェクト