html - 前端css 布局是否可以全部用 Flexbox。 抛弃浮动.
PHPz
PHPz 2017-04-17 11:59:29
0
10
1171

前端css 布局是否可以全部用 Flexbox。 抛弃浮动.

PHPz
PHPz

学习是最好的投资!

reply all(10)
伊谢尔伦

First of all, it depends on your needs. If you can use flex instead of floating in your layout, you can consider it. However, floating or other layouts have a higher degree of freedom and can achieve things that flexbox cannot achieve

Furthermore, the compatibility of flexbox itself is a big issue. You must consider the compatibility of your own application

左手右手慢动作

At present, as far as HTML5 is concerned, the compatibility coverage of flex is pretty good. Special models are only compatible (the proportion of this part is not large)
The problem on the PC side is mainly due to low versions of IE. I hacked it myself This can also be solved by loading styles that are compatible with lower versions of IE.

黄舟

Depends on the needs and product requirements. Flex layout is very convenient, but it is still not compatible with low-end browsers

大家讲道理

It’s not necessary. If we could abandon them all, the Computer Association would have killed him long ago without you having to do anything. However, flex layout has some compatibility issues, and it is not as flexible as float layout, so it just depends on the situation. There is no need to dwell on this issue.

左手右手慢动作

Mobile products can be used directly. If PC products need to be compatible with lower versions of IE, forget it...

PHPzhong

You can try this on the mobile version, not PC.

伊谢尔伦

You can only do mobile version, but if you want to be compatible with PC version, you should give up

左手右手慢动作

This question is like asking whether the front-end can abandon img and use background instead?

刘奇

If it is mobile. You can use flex if it is on PC. . I generally use table layout to implement various conventional layouts. . This link address https://segmentfault.com/a/11...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template