简体   繁体   中英

non-uniform behavior of flexbox in firefox and chrome?

I tried to use flexbox for the navigation bar as shown in the jsfiddle link below

http://jsfiddle.net/qq9pn/5/

it works like a charm under firefox -- as illustrated by the jsfiddle page, but in chrome the first icon sits at the center of the nav bar but the second icon is kicked out of the nav bar.

I'm aware that

-webkit-box-flex:1.0; /* Chrome */

and

-moz-box-flex:1.0; /* Firefox */

behaves different in the two browsers, but how can I enforce exactly the same behavior of flexbox in the two?

You're not using actual CSS flexbox in either Firefox or Chrome in that testcase. You're using XUL boxes in Firefox, and a very old and buggy "flexbox" draft in Chrome. They have totally different behavior from each other and from the current flexbox draft at http://dev.w3.org/csswg/css-flexbox/

I recommend not using -moz-box or -webkit-box, because they're basically very broken and will be removed, not fixed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM