我想从轮播中全面更改那些指标
我尝试了下面的代码以及许多其他代码,甚至没有一个起作用。只是在圆角处做了一些更改。
.carousel-indicators li {
border-radius: 12px;
width: 12px;
height: 12px;
background-color: #404040;
}
<div class="container">
<div id="carouselExampleIndicators" class="carousel slide" data- ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="img/Background.png" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="img/Layer_4.png" class="d-block w-100" alt="...">
</div>
<div class="carousel-item">
<img src="img/Layer_5.png" class="d-block w-100" alt="...">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
答案 0 :(得分:0)
如果我的理解正确,您是要更改列表项的项目符号吗?
您将要使用无序列表
RTLD_LAZY
然后将您的CSS更改为此:
<ul class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ul>