如何在没有样式滑块的光滑滑块中设置点样式

时间:2018-05-18 10:50:28

标签: javascript jquery css3

当我使用类.slick-active来设置点样式时,我的轮播背景也会风格化。如何从幻灯片中删除背景并使点背景活动?

.slick-active{
    width: 1.333rem;
    height: 1.333rem;
    background: #23aae2;
    border-radius: 50%;
}

.comment__choise li{
    display: inline-block;
    width: 1.333rem;
    height: 1.333rem;
    border: 0.067rem dashed #23aae2;
    border-radius: 50%;
    margin-right: 5px;
}

JS代码

$(document).ready(function(){
$('.single-item').slick({
dots: true,
dotsClass: 'comment__choise > li',
infinite: false,
});
});

enter image description here

我用下一个代码决定我的问题

.slick-active{
width: 1.333rem;
height: 1.333rem;
background: #23aae2;
border-radius: 50%;
}

.slick-current{
background: #fff;
}

enter image description here

1 个答案:

答案 0 :(得分:0)

我无法弄清楚给定的信息大div如何获得应用于点的样式,但你可以尝试添加它,

#slick-slide00, #slick-slide01, #slick-slide02, {
background: #fff;
border-radius: 0px;
} 
相关问题