display:box
display:boxはFlexコンテナボックスを作成するためのdisplayプロパティです。
もともと「display:box」と定義されていたが途中で「display:flexbox」に変更され、最終的に「display:flex」なったため少し古いブラウザでベンダープリフィックス付きで実装されている。
.selector{
display:-moz-box;
display:-webkit-box;
}
「display:flexbox」や「display:flex」と組み合わせると以下のように記述するのがよいでしょう。
.selector{
display : -webkit-box;
display : -ms-flexbox;
display : -webkit-flex;
display : flex;
}
対応ブラウザ
IE | Chrome | Safari | Firefox | iOS | Android | |
---|---|---|---|---|---|---|
box | ☓ | △ 4〜20 | △ 3.1〜6.0 | △ 2〜21 | △ 3.2〜6.1 | △ 2.1〜4.3 |
flexbox | △ 9 | ☓ | ☓ | ☓ | ☓ | ☓ |
flex | ◯ 10〜 | △ 21〜27 ◯ 28〜 |
◯ 6.1〜 | ◯ 22〜 | △ 7〜 | ◯ 4.4〜 |
◯は実装済み、△はベンダープレフィックス付の実装、☓は未実装です。
参考URL
http://www.w3.org/TR/2009/WD-css3-flexbox-20090723/
登録日 : 2015年02月20日 最終更新日 : 2015年4月26日