swiper3能完美运用在移动端,但是运用在PC端,特别是IE浏览器上不能兼容,没有效果,要使IE兼容Swiper的话必须使用swiper2,也就是idangerous.swiper.js,
下载地址是http://2.swiper.com.cn/download/index.html#file1
但是swiper2的API与swiper3的不同,需要根据swiper2的API来具体运用。
例如分页器,
html
//swiper3
<div class=”swiper-pagination”></div>
//swiper2
<div class=’pagination’></div>
css
//swiper2
<style>
.pagination {
position: absolute;
z-index: 20;
bottom: 10px;
100%;
text-align: center;
}
.swiper-pagination-switch
{
display: inline-block;
8px;
height: 8px;
border-radius: 8px;
background: #555;
margin: 0 5px;
opacity: 0.8;
border: 1px solid #fff;
cursor: pointer;
}
.swiper-active-switch
{
background: #fff;
}
</style>
//swiper3不需要定义css
js
<script>
var swiper= new Swiper(“.swiper-container”,{
//swiper3
pagination:’.swiper-pagination’
//swiper2
pagination:’.pagination’
})
</script>