时间:2022-09-07 09:59:00 | 栏目:vue | 点击:次
下面是错误写法
<style scoped>
.swiper-pagination-bullet-active {
background: white;
}
</style>
正确写法
<style >
.swiper-pagination-bullet-active {
background: white;
}
</style>
开发过程中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);
}