You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Authors are encouraged to control flexibility using the flex shorthand
rather than with flex-basis directly, as the shorthand correctly resets
any unspecified components to accommodate common uses.
一直感觉这两个属性比较像,有点困惑,今天尝试列举下它们的不同。
3.1 对于'auto'和'content'以外的属性值,它的效果和设置width一样
3.2 对于'auto', 它会去读width的值,如果width也为‘auto’, 那flex-basis的效果与值为‘content’效果一致
3.3 'content',基于item内容的大小
ps:
Reference:
flex-basis-property
The text was updated successfully, but these errors were encountered: