插入文件
```
//如果要更改iconfont样式需要更改此处地址
```
框架代码
```
```
js代码
```
window.onload = function () {
var mySwiper = new Swiper('.swiper-container', {
// direction: 'horizonal',
loop: true,
autoplay: {
delay: 2000,
stopOnLastSlide: false,
disableOnInteraction: false,
},
// 如果需要分页器
pagination: {
el: '.swiper-pagination',
clickable: true
},
// 如果需要前进后退按钮
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
}
});
};
```
样式修改
```
/* 导航按钮样式更改 */
.swiper-button-prev,.swiper-button-next{
background: none;
}
.iconfont{
font-size: 30px;
}
/* 分页器样式更改 */
.swiper-pagination-bullet-active{
background: #333;
}
```