Mr-haili / aaa-blog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flex-box 大法好

Mr-haili opened this issue · comments

commented

https://stackoverflow.com/questions/41772697/flex-none-vs-non-specified-omitted-flex-property

https://medium.com/@tiffnogueira/understanding-flex-shrink-flex-grow-and-flex-basis-and-using-these-properties-to-their-full-e4b4afd2c930

结论:
flex: none 等价于 flex: 0 0 auto,元素既不会收缩也不会扩张,元素的宽度只和自己本身的尺寸相关。
flex: initial 等价于 flex: 0 1 auto,元素在不会扩张,但是会在空间不够的时间收缩。