বুটস্ট্রাপ ক্যারোসেল | Bootstrap Carousel
উদাহরণঃ ক্যারোসেল ইভেন্টের ব্যবহার
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Carousel 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/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
width: 80%;
margin: auto;
}
</style>
</head>
<body>
<div class="container">
<div id="carouselId" class="carousel slide" data-ride="carousel">
<!-- ইন্ডিকেটরস -->
<ol class="carousel-indicators">
<li data-target="carouselId" data-slide-to="0" class="active"></li>
<li data-target="carouselId" data-slide-to="1"></li>
<li data-target="carouselId" data-slide-to="2"></li>
<li data-target="carouselId" data-slide-to="3"></li>
</ol>
<!-- স্লাইড পার্ট -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="nilgiri.jpg" alt="Nilgiri" width="460" height="345">
</div>
<div class="item">
<img src="paris.jpg" alt="Paris Tower" width="460" height="345">
</div>
<div class="item">
<img src="triangle.jpg" alt="Triangle" width="460" height="345">
</div>
<div class="item">
<img src="doha.jpg" alt="Doha Qatar" width="460" height="345">
</div>
</div>
<!-- আগে পরে যাওয়ার জন্য কন্ট্রোলার তৈরি -->
<a class="left carousel-control" href="#carouselId" 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="#carouselId" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<script>
$(document).ready(function () {
$("#carouselId").on('slide.bs.carousel', function () {
alert('A new slide is about to be shown!');
});
$("#carouselId").on('slid.bs.carousel', function () {
alert('The carousel has finished sliding from one item to another!');
});
});
</script>
</body>
</html>
ফলাফল