我想将轮播指标设为数字而不是点,仅显示活动的和最后一个,以及最后一个滑块,例如数字6显示6中的6。
.carousel-indicators
{
li{
background-color: $color-1;
border: 0 none;
border-radius: 50%;
height: 30px;
margin: 3px;
/* opacity: 0.5; */
width: 30px;
cursor: pointer;
color: $white;
text-indent: 0;
text-align: center;
line-height: 30px;
display: none;
&.active,&:last-child{
display: block;
}
&.active,&:hover{
background-color: rgba($color-1,.4);
//opacity: 0.4;
}
}
}
<ol class="carousel-indicators">
<li data-target="#video-carousel-example2" data-slide-to="0" class="active">1</li>
<li data-target="#video-carousel-example2" data-slide-to="1">2</li>
<li data-target="#video-carousel-example2" data-slide-to="2">3</li>
<li data-target="#video-carousel-example2" data-slide-to="3">4</li>
</ol>