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