zhpblog
<!-- 如果需要分页器 -->
<div class="swiper-pagination">
<ul class="pagination">
</ul>
</div>
适用于swiper 4.x
<script>
var mySwiper = new Swiper (\'.swiper-container\', {
// 如果需要前进后退按钮
pagination: {//分页容器的css选择器
el:\'.pagination\',
clickable:true,
renderBullet:function (index, className) {
var text = \'\';
switch (index){
case 0:
text = \'******\';
break;
case 1:
text = \'******\';
break;
case 2:
text = \'*****\';
break;
case 3:
text = \'*****\';
break;
case 4:
text = \'*****\';
break;
case 5:
text = \'****\';
break;
case 6:
text = \'****\';
break;
}
return \'<li class="\'+className+\'">\' + text + \'</li>\'
}
},
});
</script>

分类:

技术点:

相关文章:

  • 2021-11-24
  • 2021-10-16
  • 2018-10-22
  • 2019-03-21
  • 2021-11-06
  • 2021-11-13
  • 2021-11-27
  • 2021-08-08
猜你喜欢
  • 2021-12-06
  • 2021-12-06
  • 2021-12-06
  • 2021-12-06
  • 2021-11-14
  • 2021-11-12
  • 2021-12-06
相关资源
相似解决方案