CSSフレックスラッププロパティ
例
必要に応じて、柔軟なアイテムをラップします。
div {
display: flex;
flex-wrap: wrap;
}
定義と使用法
このflex-wrap
プロパティは、フレキシブルアイテムをラップするかどうかを指定します。
注:要素が柔軟なアイテムでない場合、flex-wrap
プロパティは効果がありません。
デフォルト値: | nowrap |
---|---|
遺伝性の: | いいえ |
アニメート可能: | 番号。アニメート可能について読む |
バージョン: | CSS3 |
JavaScript構文: | オブジェクト.style.flexWrap = "nowrap" |
ブラウザのサポート
表の数字は、プロパティを完全にサポートする最初のブラウザバージョンを示しています。
数字の後に-webkit-または-moz-が続く場合は、プレフィックスを使用して機能した最初のバージョンを指定します。
Property | |||||
---|---|---|---|---|---|
flex-wrap | 29.0 21.0 -webkit- |
11.0 | 28.0 18.0 -moz- |
9.0 6.1 -webkit- |
17.0 |
CSS構文
flex-wrap: nowrap|wrap|wrap-reverse|initial|inherit;
プロパティ値
Value | Description | Play it |
---|---|---|
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 |
関連ページ
CSSチュートリアル:CSSフレキシブルボックス
CSSリファレンス:flexプロパティ
CSSリファレンス:flex-flowプロパティ
CSSリファレンス:flex-directionプロパティ
CSSリファレンス:flex-basisプロパティ
CSSリファレンス:flex-growプロパティ
CSSリファレンス:flex-shrinkプロパティ
HTML DOMリファレンス:flexWrapプロパティ