xjxz

容器的概念,是用来包含其它容器(container)和项目(item)。

flex container——flex容器

A flexbox layout is defined using the flex or inline-flex values of the display property on the parent item. This element then becomes a flex container, and each one of its children becomes a flex item.

给view(在小程序中用view,h5里用div)的display属性设置为flex或inline-flex,这个view就成了flex容器,view里的元素就成了flex item。

 

A value of flex causes the element to become a block level flex container, and inline-flex an inline level flex container. These values create a flex formatting context for the element, which is similar to a block formatting context in that floats will not intrude into the container, and the margins on the container will not collapse with those of the items.

 

设置为display:flex时,是块级弹性容器;设置为display:inline-flex时,是行内级弹性容器。

posted on 2018-03-01 21:52  程序媛鼓励师  阅读(1999)  评论(0编辑  收藏  举报

分类:

技术点:

相关文章:

  • 2021-12-07
  • 2021-11-21
  • 2021-11-16
  • 2021-11-29
  • 2021-07-13
  • 2021-12-24
  • 2022-12-23
猜你喜欢
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
  • 2021-09-21
  • 2021-08-01
相关资源
相似解决方案