弹性盒子页面布局

页面:

 <view class="item">

    <view class="item-list">

      <image src="/img/indexSelect.png" class="img" />

      <view class="text">京东超市</view>

    </view>

    <view class="item-list">

      <image src="/img/indexSelect.png" class="img" />

      <view class="text">京东超市</view>

    </view>

    <view class="item-list">

      <image src="/img/indexSelect.png" class="img" />

      <view class="text">京东超市</view>

    </view>

    <view class="item-list">

      <image src="/img/indexSelect.png" class="img" />

      <view class="text">京东超市</view>

    </view>

    <view class="item-list">

      <image src="/img/indexSelect.png" class="img" />

      <view class="text">京东超市</view>

    </view>

    <view class="item-list">

      <image src="/img/indexSelect.png" class="img" />

      <view class="text">京东超市</view>

    </view>

    <view class="item-list">

      <image src="/img/indexSelect.png" class="img" />

      <view class="text">京东超市</view>

    </view>

    <view class="item-list">

      <image src="/img/indexSelect.png" class="img" />

      <view class="text">京东超市</view>

    </view>

    <view class="item-list">

      <image src="/img/indexSelect.png" class="img" />

      <view class="text">京东超市</view>

    </view>

     <view class="item-list">

      <image src="/img/indexSelect.png" class="img" />

      <view class="text">京东超市</view>

    </view>

  </view>

wxss:

.item{

  width: 100%;

  height: 350rpx;

  /* background-color: aqua; */

  display: flex;

  justify-content: space-around;

  align-items: center;

  flex-wrap: wrap;

}

.item-list{

  width:150rpx;

  height: 150rpx;

  /* background-color: blueviolet; */

  display: flex;

  justify-content:space-around;

  align-items: center;

  flex-direction: column;

  align-content: space-around;

}

.text{

  font-size: 30rpx;

}

上一篇:Java内存模型(JMM),安卓系列学习进阶视频


下一篇:JVM面试知识点