I am making an HTML page that contains a Bootstrap carousel. I replaced the selector with the image. Then, by clicking the image, the slider will also change.
I wanted to make the image selector opacity change according to the content in the slider change. For example, all the image selector initial opacity is 0.5. When the selector shows the first item, the opacity of the first slider will change to 1. And so on for the slider 2 and 3.
After I made all the selectors into opacity 0.5, it can't change the active class to opacity 1. Thus, I wanted to request ways to change the opacity of the image selector.
This is the code of my selector:
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active">
<div class="img">
<img src="xx.jpg" />
</div>
</li>
<li data-target="#myCarousel" data-slide-to="1">
<div class="img">
<img src="xx.jpg" />
</div>
</li>
<li data-target="#myCarousel" data-slide-to="2">
<div class="img">
<img src="xx.jpg" />
</div>
</li>
</ol>
I did try to do this but it fails
.carousel-indicators .img.active {
opacity:1;
}