In Ng bootstrap carousel component how can I have transition like fade-in/out between Images/Slides ?
I found a way to include a fade in/out like animation.
You have to define the .carousel-item and .carousel-item.active css class as follows:
.carousel-item {
display: block !important;
z-index: 1;
position: absolute;
opacity: 0;
transition: opacity 1.5s ease-in-out, visibility 1s;
visibility: hidden;
}
.carousel-item.active {
position: relative;
opacity: 1;
transition: opacity 1.5s ease-in-out, visibility 1s;
visibility: visible;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With