Swiper中文论坛
标题:
swiper如何嵌套
[打印本页]
作者:
六月天123
时间:
2016-1-31 13:29
标题:
swiper如何嵌套
就是说我想做个单页网站,从上到下一共五个页面,第一个页面嵌套进去一个左右切换的banner,创建函数的时候class不就冲突了嘛 这怎么解决
作者:
789998
时间:
2016-2-1 13:48
给容器再加个类
<div class="swiper-container swiper-container-v">
<div class="swiper-wrapper ">
<div class="swiper-slide ">
<div class="swiper-container swiper-container-h" >
<div class="swiper-wrapper swiper-wrapper-h">
<div class="swiper-slide"></div>
<div class="swiper-slide"></div>
</div>
</div>
</div>
<div class="swiper-slide "></div>
<div class="swiper-slide "></div>
<div class="swiper-slide "></div>
</div>
</div>
<script>
var swiperV = new Swiper('.swiper-container-h', {
pagination: '.swiper-pagination-h',
mousewheelControl : true,
});
var swiperV = new Swiper('.swiper-container-v', {
pagination: '.swiper-pagination-v',
direction: 'vertical',
mousewheelControl : true,
});
</script>
复制代码
欢迎光临 Swiper中文论坛 (http://bbs.swiper.com.cn/)
Powered by Discuz! X3.2