当前位置:网站首页>Flex layout

Flex layout

2022-06-13 03:42:00 _ Virgo programmer's daily life

flex The attribute is flex-grow, flex-shrink and flex-basis Abbreviation , The default value is 0 1 auto. The last two properties are optional .

  • flex-grow Attribute defines the magnification of the item , The default is 0, That is, if there is any remaining space , And don't zoom in .
  • flex-shrink Attribute defines the reduction ratio of the project , The default is 1, That is, if there is not enough space , The project will shrink .
  • flex-basis Property defines before allocating extra space , Spindle space occupied by the project (main size). Browser according to this property , Calculate if the spindle has extra space . Its default value is auto, The original size of the project . It can be set to follow width or height Property is the same value ( such as 350px), Then the project will occupy a fixed space .
原网站

版权声明
本文为[_ Virgo programmer's daily life]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202280527093755.html