bootstrap 4 slider fade in out | bootstrap carousel fade w3learnpoint

<textarea class="html_box"> <!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script> <style> .carousel-caption h3.slider_txt1{ opacity: 0; animation:infinite 8s fade_txt1; animation-delay:1s; } @keyframes fade_txt1{ 0% { opacity:0; } 100% { opacity: 1; } } .carousel-caption h3.slider_txt2{ opacity:1; animation:infinite 8s fade_txt2; animation-delay:0.5s; } .carousel-fade1{ opacity: 0; transition-duration: .6s; transition-property: opacity; } .carousel-fade1.active, .carousel-fade2 .carousel-item-next.carousel-item-left, .carousel-fade2 .carousel-item-prev.carousel-item-right { opacity: 1; } .carousel-fade2 .active.carousel-item-left, .carousel-fade2 .active.carousel-item-right { opacity: 0; } @keyframes fade_txt2{ 0% { opacity:1; } 100% { opacity:0; } } </style> </head> <body> <div id="demo" class="carousel slide carousel-fade2" data-ride="carousel"> <ul class="carousel-indicators"> <li data-target="#demo" data-slide-to="0" class="active"></li> <li data-target="#demo" data-slide-to="1"></li> <li data-target="#demo" data-slide-to="2"></li> <li data-target="#demo" data-slide-to="3"></li> </ul> <div class="carousel-inner"> <div class="carousel-item active"> <img src="http://ah.transbizsolution.com/images/banner-home-1.jpg" alt="Artisan Homes"> <div class="carousel-caption"> <h3 class="slider_txt1">Los Angeles1</h3> </div> </div> <div class="carousel-item carousel-fade1"> <img src="http://ah.transbizsolution.com/images/banner-home-2.jpg" alt="Artisan Homes"> <div class="carousel-caption"> <h3 class="slider_txt2">Los Angeles11</h3> </div> </div> <div class="carousel-item"> <img src="http://ah.transbizsolution.com/images/banner-home-3.jpg" alt="Artisan Homes"> <div class="carousel-caption"> <h3 class="slider_txt1">Los Angeles2</h3> </div> </div> <div class="carousel-item carousel-fade1"> <img src="http://ah.transbizsolution.com/images/banner-home-4.jpg" alt="Artisan Homes"> <div class="carousel-caption"> <h3 class="slider_txt2">Los Angeles22</h3> </div> </div> </div> <a class="carousel-control-prev" href="#demo" data-slide="prev"> <span class="carousel-control-prev-icon"></span> </a> <a class="carousel-control-next" href="#demo" data-slide="next"> <span class="carousel-control-next-icon"></span> </a> </div> </body> </html> </textarea>

Bootstrap 4 slider fade in fade out slider w3learnpoint

]]>

Leave a Reply

Your email address will not be published. Required fields are marked *