swiper里面套用list显示
< swiper class = "swiper" current = "{{currentId}}" bindchange = "bindChange" duration = "300" style = "height:{{swiperHeight}}px" > < swiper-item > < view class = "schoollist" > < block wx:for = "{{items}}" wx:key = "item" > < view class = "school-list" > < navigator url = "/pages/photo/photo?id={{item.id}}" > < view class = "school-list-info" index = "{{index}}" > < image class = "school-list-photo" src = "{{item.imageUrl}}" /> < text class = "school-list-desc" >{{item.content}}</ text > </ view > </ navigator > </ view > </ block > </ view > </ swiper-item > </ swiper > |
外部是一个swiper,内部是一个list,外部swiper实现多个list可以进行左右滑动切换,list进行展示数据。这时候list不能进行上下滑动,请问有人知道这是什么原因么?
下面是对应的WXSS文件
.swiper{ display : block ; width : 100% ; overflow : hidden ; margin : 0 ; border : 0 ; margin-top : 0px ; background-color : #eaeaea ; } .schoollist-head-img{ width : 100% ; height : 180 rpx; padding : 20 rpx; box-sizing: border-box; } .schoollist{ margin-top : 20 rpx; width : 750 rpx; height : 1550 rpx; } .school-list-info{ float : left ; margin-left : 20 rpx; margin-top : 20 rpx; position : relative ; } .school-list-photo{ width : 350 rpx; height : 250 rpx; margin-bottom : 50 rpx; } .school-list-desc{ display : block ; background-color : #000 ; color : #fff ; position : absolute ; bottom : 3% ; left : 0 ; width : 94% ; text-align : center ; font-size : 25 rpx; padding : 10 rpx; opacity: 0.7 ; } |