スタイルflexShrinkプロパティ
例
青いDIV要素を他の柔軟なアイテムの5倍縮小させます。
document.getElementById("myBlueDiv".style.flexShrink = "5";
定義と使用法
flexShrinkプロパティは、同じコンテナ内の残りのフレキシブルアイテムに対してアイテムがどのように縮小するかを指定します。
注:要素がフレキシブルアイテムでない場合、flexShrinkプロパティは効果がありません。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
flexShrink | Yes | 11.0 | Yes | 9.0 | Yes |
構文
flexShrinkプロパティを返します。
object.style.flexShrink
flexShrinkプロパティを設定します。
object.style.flexShrink = "number|initial|inherit"
プロパティ値
Value | Description |
---|---|
number | A number specifying how much the item will shrink relative to the rest of the flexible items. Default value is 0 |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
技術的な詳細
デフォルト値: | 1 |
---|---|
戻り値: | 要素のflex-shrinkプロパティを表す文字列 |
CSSバージョン | CSS3 |
関連ページ
CSSリファレンス:flex-shrinkプロパティ
HTML DOM STYLEリファレンス:flexプロパティ
HTML DOM STYLEリファレンス:flexBasisプロパティ
HTML DOM STYLEリファレンス:flexDirectionプロパティ
HTML DOM STYLEリファレンス:flexFlowプロパティ
HTML DOM STYLEリファレンス:flexGrowプロパティ
HTML DOM STYLEリファレンス:flexWrapプロパティ
❮スタイルオブジェクト