slidesPerView :'auto' 无法上下滑动
需求是swiper上下滑动,且高度自动匹配内容高度。使用了direction:'vertical';slidesPerView :'auto',发现无法上下滑动了。尝试过使用autoHeight: true,发现再vertical下并不能自动调整高度。请大神帮忙解决同求啊用了direction: 'vertical', slidesPerView: 'auto',数据动态加载出来了没办法往上滑 看下面的内容:'( 楼主解决没有 我的现在能用了 不介意的话看下我的代码吧
<div class="swiper-wrapper">
<div class="swiper-slide slidepage">
<div class="swiper-container scroll">
<div class="swiper-wrapper" >
<div class="swiper-slide slidescroll" >
<div class="nav0 nav">
</div>
</div>
</div>
</div>
</div>
在slidescroll下面再套一层
在js里面使用swiper的这个属性noSwipingClass : 'scroll',(禁止swiper自身的上下拖动吧)
css里面这样子写 .nav{
position: relative;
overflow: hidden;
overflow-y:scroll ;
/* border: 1px solid red; */
height: calc(88vh) !important;
-webkit-overflow-scrolling:touch。
}
这样就可以拖动了
页:
[1]