微信小程序横向图片左右滑动
生活随笔
收集整理的這篇文章主要介紹了
微信小程序横向图片左右滑动
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
wxml代碼
<scroll-view scroll-x="true"> <view class="banner" scroll-x="true"> <view class="banner_Item"> 第一塊</view> <view class="banner_Item"> 第二塊</view> <view class="banner_Item"> 第三塊</view> <view class="banner_Item"> 第四塊</view> <view class="banner_Item"> 第五塊</view> </view> </scroll-view>wxss代碼
.banner{height:160rpx; width:100%;display: flex;display: -webkit-box;flex-direction: column;} .banner_Item{ width: 160rpx;height: 160rpx;background-color:red;margin-right:10rpx;}效果圖
總結
以上是生活随笔為你收集整理的微信小程序横向图片左右滑动的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 什么是async、await?
- 下一篇: 小程序如何写tab选项卡