当前位置:网站首页>Wechat applet, automatic line feed for purchasing commodity attributes, fixed number of divs, automatic line feed for excess parts

Wechat applet, automatic line feed for purchasing commodity attributes, fixed number of divs, automatic line feed for excess parts

2022-06-11 05:19:00 A programmer who doesn't like to stay up late but often stays u

Wechat applet , Purchase product attribute auto wrap , Fix div Number , Auto wrap the line beyond the limit

Reference resources ** Specify each line div Number ( Three examples )**

<view class="spec">
      <view class="spec_title"> Color </view>
      <view class="spec_content">
        <view class="spec_back">
          <text class="spec_text"> white </text>
        </view>
        <view class="spec_back">
          <text class="spec_text"> Red </text>
        </view>
        <view class="spec_back">
          <text class="spec_text"> Blue </text>
        </view>
        <view class="spec_back">
          <text class="spec_text"> green </text>
        </view>
        <view class="spec_back">
          <text class="spec_text"> golden </text>
        </view>
        <view class="spec_back">
          <text class="spec_text"> yellow </text>
        </view>
      </view>
    </view>
.spec {
    
  padding: 10rpx;
}

.spec .spec_title {
    
  margin: 10rpx;
  font-size: 30rpx;
}

.spec .spec_content {
    
  display: flex;
  /* justify-content: flex-start; */
  flex-flow: row wrap;
  align-content: flex-start;
}

.spec .spec_content .spec_back {
    
  margin: 10rpx;
  width: 150rpx;
  height: 80rpx;
  background-color: #f0f0f0;
  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-pack: center;
  -webkit-box-align: center;
  border-radius: 10rpx;
}

 Insert picture description here

原网站

版权声明
本文为[A programmer who doesn't like to stay up late but often stays u]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206110507368003.html