【小程序】实现双列商品效果

 wxml代码

<!-- ====== 商品区 ====== -->

<view class="shopBox">

    <view class="proc" wx:for="{
   
   {8}}">
        商品1
    </view>
</view>

wcss代码


.shopBox {
    height: 500px;
    width: 96%;
    background-color: rgb(203, 237, 250);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
}

.proc {
    height: 200px;
    width: 48%;
    background-color: #fad2d2;
    margin-left: 5px;
    margin-bottom: 5px;
    text-align: center;
    line-height: 200px;
}

猜你喜欢

转载自blog.csdn.net/dxnn520/article/details/125432194