微信小程序flex佈局

聲明:display:flex

換行flex-wrap:flex-wrap:nowrap(不換行)、wrap(換行)、wrap-reserve(第一行在下面);

主軸對齊(橫向對齊)justify-content:flex-start(起點對齊),flex-end(終點對齊),center(居中對齊),space-between(兩邊挨近容器,item等距),space-around(兩邊距離相加等於item之間的距離,item等距)。默認是flex-start

測軸對齊(縱向對齊)align-item:stretch(拉伸)、flex-start(起點對齊)、flex-end(終點對齊)、center(居中對齊)、baseline(子元素第一行文字對齊)

https://www.cnblogs.com/dragondean/p/5922740.html

https://www.cnblogs.com/qingchunshiguang/p/8011103.html

原文地址:https://www.cnblogs.com/Zhengxiaoxiao/p/10577230.html