我有一个来自Bootstrap 4的传送带,其中包含三个图像。我想在第三个旋转木马图像处于活动状态时将导航链接的颜色更改为红色,而在第一个和第二个图像处于活动状态时将颜色删除的红色。反正有这样做吗?
<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" id="c-1">
<div class="carousel-item active">
<img id="c-1" class="d-block w-100 si" data-color='light' src="https://mrdp2rbn.portal.ir/themes/custom-2fc4/userfiles/e02825.jpg" alt="First slide">
</div>
<div class="carousel-item">
<img id="c-2" class="d-block w-100 si" src="https://mrdp2rbn.portal.ir/themes/custom-2fc4/userfiles/decaa4.jpeg" alt="Second slide">
</div>
<div class="carousel-item c-3">
<img id="" class="d-block w-100 c-3 si" src="https://mrdp2rbn.portal.ir/themes/custom-2fc4/userfiles/a7a145.jpg" alt="Third slide">
</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>