微信小程序左右滑动

<scroll-view class="help" scroll-x="{{true}}">
        <view class="help_main">
          <block wx:for="{{list}}" wx:key="id">
            <view class="default">
              <image class="default_img" src="{{item.image}}"></image>
              <text>{{item.text}}</text>
            </view>
          </block>
        </view>
      </scroll-view>
 
 
.help {
  width: calc(871rpx / 1125 * 750);
  height: calc(165rpx / 1125 * 750);
  position: absolute;
  top: calc(1507rpx / 1125 * 750);
  left: calc(128rpx / 1125 * 750);
}
.help_main {
  display: flex;
  justify-content: space-between;
  width: calc(871rpx / 1125 * 750);
  height: calc(165rpx / 1125 * 750);
}
.default {
  width: calc(125rpx / 1125 * 750);
  height: calc(165rpx / 1125 * 750);
  text-align: center;
  font-size: calc(32rpx / 1125 * 750);
  padding-right: calc(61rpx / 1125 * 750);
}
.default_img {
  width: calc(125rpx / 1125 * 750);
  height: calc(125rpx / 1125 * 750);
}
效果:

 

 

posted @ 2021-12-20 15:05  阳菜  阅读(198)  评论(0)    收藏  举报