微信小程序-橫向滑動scroll-view隱藏滾動條
更新時間:2017年04月20日 08:33:15 作者:Mr_Sparta
本篇文章主要介紹了微信小程序-橫向滑動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: '玻璃棧道', desc: '22W人去過' }, { pic: '/images/example2.png', title: '玻璃棧道', desc: '22W人去過' }, { pic: '/images/example2.png', title: '玻璃棧道', desc: '22W人去過' }, { pic: '/images/example2.png', title: '玻璃棧道', desc: '22W人去過' }, { pic: '/images/example2.png', title: '玻璃棧道', desc: '22W人去過' } ] }
以上就是本文的全部內(nèi)容,希望本文的內(nèi)容對大家的學習或者工作能帶來一定的幫助,同時也希望多多支持腳本之家!
相關文章
js提交form表單,并傳遞參數(shù)的實現(xiàn)方法
下面小編就為大家?guī)硪黄猨s提交form表單,并傳遞參數(shù)的實現(xiàn)方法。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2016-05-05