Introduction :-
Hii Friends..
Today I explain how to make a carousel in bootstrap . The class="carousel" specifies that this <div> contains a carousel. The .slide class adds a CSS transition and animation effect, which makes the items slide when showing a new item. Omit this class if you do not want this effect.
Step : 1 The Code goes here :->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
<title>Asp.Net Modules</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap.theme.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/custom_HomePage.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-sm-6">
<div class="container">
<div class="row">
<div class="col-lg-3">
</div>
<div class="col-lg-9">
<!--Slider code start-->
<div id="myslider" class="carousel slide" data-interval="2000">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myslider" data-slide-to="0" class="active"></li>
<li data-target="#myslider" data-slide-to="1"></li>
<li data-target="#myslider" data-slide-to="2"></li>
<li data-target="#myslider" data-slide-to="3"></li>
<li data-target="#myslider" data-slide-to="4"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img class="img-responsive" src="img/slide1.jpg" alt="">
</div>
<div class="item">
<img class="img-responsive" src="img/slide2.jpg" alt="">
</div>
<div class="item">
<img class="img-responsive" src="img/slide3.jpg" alt="">
</div>
<div class="item">
<img class="img-responsive" src="img/slide4.jpg" alt="">
</div>
<div class="item">
<img class="img-responsive" src="img/slide5.jpg" alt="">
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#myslider" data-slide="prev">
<span class="icon-prev"></span>
</a>
<a class="right carousel-control" href="#myslider" data-slide="next">
<span class="icon-next"></span>
</a>
</div>
</div>
</div><!-- /.container -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
</body>
</html>
Here some js and css are already given by bootstrap you can easily download css from (getbootstrap.com) and js from (https://jquery.com/download/) .
DEMO:-
Hii Friends..
Today I explain how to make a carousel in bootstrap . The class="carousel" specifies that this <div> contains a carousel. The .slide class adds a CSS transition and animation effect, which makes the items slide when showing a new item. Omit this class if you do not want this effect.
Step : 1 The Code goes here :->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
<title>Asp.Net Modules</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap.theme.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<link href="css/custom_HomePage.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-sm-6">
<div class="container">
<div class="row">
<div class="col-lg-3">
</div>
<div class="col-lg-9">
<!--Slider code start-->
<div id="myslider" class="carousel slide" data-interval="2000">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myslider" data-slide-to="0" class="active"></li>
<li data-target="#myslider" data-slide-to="1"></li>
<li data-target="#myslider" data-slide-to="2"></li>
<li data-target="#myslider" data-slide-to="3"></li>
<li data-target="#myslider" data-slide-to="4"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner">
<div class="item active">
<img class="img-responsive" src="img/slide1.jpg" alt="">
</div>
<div class="item">
<img class="img-responsive" src="img/slide2.jpg" alt="">
</div>
<div class="item">
<img class="img-responsive" src="img/slide3.jpg" alt="">
</div>
<div class="item">
<img class="img-responsive" src="img/slide4.jpg" alt="">
</div>
<div class="item">
<img class="img-responsive" src="img/slide5.jpg" alt="">
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#myslider" data-slide="prev">
<span class="icon-prev"></span>
</a>
<a class="right carousel-control" href="#myslider" data-slide="next">
<span class="icon-next"></span>
</a>
</div>
</div>
</div><!-- /.container -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
</body>
</html>
Here some js and css are already given by bootstrap you can easily download css from (getbootstrap.com) and js from (https://jquery.com/download/) .
DEMO:-
short and crisp.. very nice..
ReplyDelete