I'm trying to add some simple animation to a bootstrap carousel. the code is like the below:
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active"><img src="img/form3-1.jpg" alt="Chania"></div>
<div class="item"><img src="img/form3-2.jpg" alt="Chania"></div>
<div class="item"><img src="img/form3-3.jpg" alt="Flower"></div>
</div>
<!-- Left and right controls -->
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span><span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span><span class="sr-only">Next</span>
</a>
</div>
</div>
</div>
</div>
what i m trying to do is to make the active slide scale from 1 to 1.5 in a duration of 10s. the css is below:
#myCarousel .active > img{transform:scale(1.5); -webkit-transform: scale(1.5); -webkit-transition: -webkit-transform 10s ease-out;-moz-transition: -moz-transform 10s ease-out;transition: transform 10s ease-out;}
I'm know that the HTML and CSS are correct. But when the page loads, the first slide that appears doesn't scale, but once that slide is changed the rest works perfectly. And even if i go back again to the first slide, it will work again. What I need is on the first load, to fix the animation for the first slide.