bulletElement
设定分页器指示器(小点)的HTML标签。
bulletElement信息
- 类型:
- string
- 默认:
- span
- 举例:
- li
- 启用版本:
- 4.0.0
效果演示
使用方法示例
从Swiper7开始,容器默认类名由'.swiper-container'变更为'.swiper'。
<div class="swiper">
<div class="swiper-wrapper">
<div class="swiper-slide">Slide 1</div>
<div class="swiper-slide">Slide 2</div>
<div class="swiper-slide">Slide 3</div>
</div>
<div class="swiper-pagination"></div>
</div>
<script language="javascript">
var mySwiper = new Swiper('.swiper',{
pagination: {
el: '.swiper-pagination',
bulletElement : 'li',
},
})
</script>
转载原创文章请注明:文章转载自:Swiper中文网 [https://www.swiper.com.cn]
本文地址:https://www.swiper.com.cn/api/pagination/280.html