Applet-sliding scroll-view to hide the scroll bar and Applet scroll-view
Wxml
<scroll-view class="recommend_scroll_x_box" scroll-x="true"> <view class="recommend_hot_box" wx:for="{{hotList}}"> <image src="{{item.pic}}" class="recommend_hot_image"></image> </view> </scroll-view>
Wxss
.recommend_scroll_x_box { height: 245rpx; white-space: nowrap; display: flex;}::-webkit-scrollbar { width: 0; height: 0; color: transparent;}.recommend_hot_box { width: 230rpx; height: 245rpx; margin-right: 24rpx; display: inline-block;}.recommend_hot_image { width: 230rpx; height: 143rpx;}
Js
Page ({data: {hotList: [{pic: '/images/example2.png', title: 'glass track ', desc: '22 W people visited'}, {pic: '/images/example2.png', title: 'glass channels ', desc: '22w people visited'}, {pic: '/images/example2.png', title: 'glass channels ', desc: '22 W people'}, {pic: '/images/example2.png', title: 'glass channels ', desc: '22w people visited '}, {pic:'/images/example2.png ', title: 'glass track', desc: '22w people visited '}]}
The above is all the content of this article. I hope this article will help you in your study or work. I also hope to provide more support to the customer's home!