vue修改swiper框架轮播图小圆点的样式不起作用的解决
时间:2022-09-07 09:59:00|栏目:vue|点击: 次
swiper框架轮播图小圆点样式不起作用
不要加 scoped
下面是错误写法
<style scoped>
.swiper-pagination-bullet-active {
background: white;
}
</style>
正确写法
<style >
.swiper-pagination-bullet-active {
background: white;
}
</style>
swiper小圆点默认样式改变
开发过程中swiper样式不喜欢,想要修改小圆点样式,拿到swiper下的小圆点进行修改,去设置想要的颜色,点与点之间的间距等等一系列样式
/* 圆点的样式 */
swiper .wx-swiper-dot {
width: 35rpx;
height: 7rpx;
border-radius: 50%;
display: inline-flex;
margin-left: 19rpx;
justify-content: space-between;
}
swiper .wx-swiper-dot::before {
content: '';
flex-grow: 1;
background: #fff;
border-radius: 50%;
}
swiper .wx-swiper-dot-active::before {
background: rgba(255, 255, 255, .8);
}
上一篇:vue中的生命周期及钩子函数
栏 目:vue
本文标题:vue修改swiper框架轮播图小圆点的样式不起作用的解决
本文地址:http://www.codeinn.net/misctech/213006.html






