Cross Browser support for CSS Flexbox

后端 未结 5 504
北海茫月
北海茫月 2020-12-09 18:35

I have been using the code mentioned below, it works on my Chrome but not on my IE9 and Safari.

I googled for the solution, despite I got various vendor prefixes, th

5条回答
  •  佛祖请我去吃肉
    2020-12-09 19:00

    I would suggest reading the spec to fully understand: http://dev.w3.org/csswg/css-flexbox/

    For the visually minded @chris-coyier has recently revamped his post w/ help from (@hugo-giraudel):http://css-tricks.com/snippets/css/a-guide-to-flexbox/

    code sample:Live(credit to @chris-coyier just can't find original post so remade): http://cdpn.io/oDxnp

    compiled out put would look like this

    display: flex; =>

    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    

    flex-direction: row; =>

    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    

提交回复
热议问题