September 27, 2021

Bootstrap slider with caption

 <div class="bd-example">
  <div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
    <ol class="carousel-indicators">
      <li data-target="#carouselExampleCaptions" data-slide-to="0" class="active"></li>
      <li data-target="#carouselExampleCaptions" data-slide-to="1"></li> 
    </ol>
    <div class="carousel-inner">
      <div class="carousel-item active">
        <img src="http://tolmatol.com/uploads-images/bootstrap-slider-with-caption/banner2.jpg" class="d-block w-100" alt="...">
         
            <div class="container">
               <div class="caption-area">
                <div class="caption d-none d-md-block">
          <h5 class="animated slideInLeft" style="animation-delay: 1s;">spring 2019 <br> <span class="text-white">Top New Collections</span></h5> 
          <p class="animated slideInRight" style="animation-delay: 2s;">Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
          
          <a href="#" class="btn btn-warning animated zoomIn" style="animation-delay: 2.5s;">Read more</a>
        </div> 
           </div>
            </div>
      </div>
      <div class="carousel-item">
        <img src="http://tolmatol.com/uploads-images/bootstrap-slider-with-caption/banner1.jpg" alt="...">
        <div class="container">
               <div class="caption-area">
                <div class="caption d-none d-md-block">
          <h5 class="animated slideInLeft" style="animation-delay: 1s;">Top Brands <br> <span class="text-white">New Collections</span></h5>  
          <p class="animated slideInRight" style="animation-delay: 2s;">Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
          
          <a href="#" class="btn btn-warning animated zoomIn" style="animation-delay: 2.5s;">Read more</a>
        </div> 
            </div>
             </div>
      </div> 
    </div>
    <a class="carousel-control-prev" href="#carouselExampleCaptions" 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="#carouselExampleCaptions" role="button" data-slide="next">
      <span class="carousel-control-next-icon" aria-hidden="true"></span>
      <span class="sr-only">Next</span>
    </a>
  </div>
</div>

 

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.7.2/animate.min.css">
    <link href="https://fonts.googleapis.com/css?family=Poppins:400,700&display=swap" rel="stylesheet">
    <style>
        body { font-family: 'Poppins', sans-serif; font-size: 16px; font-weight: 400;}
        .carousel img {width:100%} 
        .caption-area {  }
        .caption { position: absolute; top:25%; left: 15%; right: 0px;}
        .caption h5 { color: #ffc107; font-size: 4em; font-weight: 700; text-transform: uppercase;}
        .caption p { font-size: 1.8em; color: #fff;}
        .caption .btn { font-size: 25px; margin-top: 30px; border-radius: 0px;}
    </style>

 

<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

 

Leave a Reply

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