www.ambanadi.com

HTML

<!DOCTYPE html>
<html lang="en" >
<head>
  <meta charset="UTF-8">
  <title>CodePen - TOUCH MOBILE BOOTSTRAP SLIDER GALLERY</title>
  <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'>
<link rel='stylesheet' href='https://s3-us-west-2.amazonaws.com/s.cdpn.io/172203/bootstrap-touch-carousel.css'>
<link rel="stylesheet" href="./style.css">

</head>
<body>
<!-- partial:index.partial.html -->
<div id="mycarousel" class="carousel slide" data-ride="carousel">
  <!-- Indicators -->
  <ol class="carousel-indicators">
    <li data-target="#mycarousel" data-slide-to="0" class="active"></li>
    <li data-target="#mycarousel" data-slide-to="1"></li>
    <li data-target="#mycarousel" data-slide-to="2"></li>
    <li data-target="#mycarousel" data-slide-to="3"></li>
    <li data-target="#mycarousel" data-slide-to="4"></li>
  </ol>

  <!-- Wrapper for slides -->
  <div class="carousel-inner" role="listbox">
    <div class="item active">
      <img src="https://unsplash.it/2000/1250?image=397" data-color="lightblue" alt="First Image">
      <div class="carousel-caption">
        <h3>First Image</h3>
      </div>
    </div>
    <div class="item">
      <img src="https://unsplash.it/2000/1250?image=689" data-color="firebrick" alt="Second Image">
      <div class="carousel-caption">
        <h3>Second Image</h3>
      </div>
    </div>
    <div class="item">
      <img src="https://unsplash.it/2000/1250?image=675" data-color="violet" alt="Third Image">
      <div class="carousel-caption">
        <h3>Third Image</h3>
      </div>
    </div>
    <div class="item">
      <img src="https://unsplash.it/2000/1250?image=658" data-color="lightgreen" alt="Fourth Image">
      <div class="carousel-caption">
        <h3>Fourth Image</h3>
      </div>
    </div>
    <div class="item">
      <img src="https://unsplash.it/2000/1250?image=638" data-color="tomato" alt="Fifth Image">
      <div class="carousel-caption">
        <h3>Fifth Image</h3>
      </div>
    </div>
  </div>

  <!-- 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>
<!-- partial -->
  <script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js'></script>
<script src='//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js'></script>
<script src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/172203/bootstrap-touch-carousel.js'></script>
<script  src="./script.js"></script>

</body>
</html>

CSS

h3 {
  display: inline-block;
  padding: 10px;
  background: #B9121B;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.p {
  text-align: center;
  padding-top: 40px;
  font-size: 13px;
}

JS

$('.carousel').carousel({
  interval: 6000,
  pause: "false"
});
 

Leave a Reply

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