What are the differences between flex-basis and width?

后端 未结 5 1800
Happy的楠姐
Happy的楠姐 2020-11-21 05:47

There have been questions and articles about this, but nothing conclusive as far as I can tell. The best summary I could find is

flex-basis a

5条回答
  •  暖寄归人
    2020-11-21 06:15

    It makes a difference if you're wrapping.

    Say, you set a child to width:0 and expect it to wrap, well that's not going to happen. But with flex-basis:0 it will wrap. (provided overflow isn't hidden)

提交回复
热议问题