search

Home  >  Q&A  >  body text

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

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

PHPzPHPz2866 days ago1174

reply all(10)I'll reply

  • 巴扎黑

    巴扎黑2017-04-17 12:01:29

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 12:01:29

    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

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 12:01:29

    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.

    reply
    0
  • 黄舟

    黄舟2017-04-17 12:01:29

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

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 12:01:29

    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.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 12:01:29

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

    reply
    0
  • PHPz

    PHPz2017-04-17 12:01:29

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

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 12:01:29

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

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 12:01:29

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

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 12:01:29

    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...

    reply
    0
  • Cancelreply