vue-awsome-swiper修改轮播图pagination颜色问题
在使用vue-awsome-swiper轮播图的时候,它的pagination颜色是蓝色,想修改成别的颜色时,发现修改.swiper-pagination-bullet-active 不管用.wrapperoverflow :hiddenwidth :100%height :0padding-bottom :26.666666666%.swi...
·
在使用vue-awsome-swiper轮播图的时候,它的pagination颜色是蓝色,想修改成别的颜色时,发现修改.swiper-pagination-bullet-active 不管用
.wrapper
overflow :hidden
width :100%
height :0
padding-bottom :26.666666666%
.swiper-pagination-bullet-active
background :#ffffff !important //没效果
没效果的原因是因为style 设置着scoped,只能作用当前组件,
解决方法:
<style lang="stylus" scoped>
.wrapper >>>.swiper-pagination-bullet-active //看这里
background :#ffffff
.wrapper
overflow :hidden
width :100%
height :0
padding-bottom :26.666666666%
.wrapper >>>.swiper-pagination-bullet-active 表示的是在wrapeer下所有出现.swiper-pagination-bullet-active
这样就不受scoped的限制了
更多推荐
已为社区贡献3条内容
所有评论(0)