"Bootstrap 4 Carousel"
Bootstrap 4.1.1 Snippet by mushkaa

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row blog"> <div class="col-md-12"> <div id="blogCarousel" class="carousel slide" data-ride="carousel"> <ol class="carousel-indicators"> <li data-target="#blogCarousel" data-slide-to="0" class="active"></li> <li data-target="#blogCarousel" data-slide-to="1"></li> </ol> <!-- Carousel items --> <div class="carousel-inner"> <div class="carousel-item active"> <div class="row"> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> </div> <!--.row--> </div> <!--.item--> <div class="carousel-item"> <div class="row"> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> <div class="col-md-3"> <a href="#"> <img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;"> </a> </div> </div> <!--.row--> </div> <!--.item--> </div> <!--.carousel-inner--> </div> <!--.Carousel--> </div> </div> </div>
.blog .carousel-indicators { left: 0; top: auto; bottom: -40px; } /* The colour of the indicators */ .blog .carousel-indicators li { background: #a3a3a3; border-radius: 50%; width: 8px; height: 8px; } .blog .carousel-indicators .active { background: #707070; }
// optional $('#blogCarousel').carousel({ interval: 5000 });

Related: See More


Questions / Comments:

not working what is the reason:

<!doctype html>

<html lang="en">

<head>

<!-- Required meta tags -->

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">

<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>

<title>Hello, world!</title>

<style>

.blog .carousel-indicators {

left: 0;

top: auto;

bottom: -40px;

}

/ The colour of the indicators /

.blog .carousel-indicators li {

background: #a3a3a3;

border-radius: 50%;

width: 8px;

height: 8px;

}

.blog .carousel-indicators .active {

background: #707070;

}s

</style>

</head>

<body>

<div class="container">

<div class="row blog">

<div class="col-md-12">

<div id="blogCarousel" class="carousel slide" data-ride="carousel">

<ol class="carousel-indicators">

<li data-target="#blogCarousel" data-slide-to="0" class="active"></li>

<li data-target="#blogCarousel" data-slide-to="1"></li>

</ol>

<!-- Carousel items -->

<div class="carousel-inner">

<div class="carousel-item active">

<div class="row">

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

</div>

<!--.row-->

</div>

<!--.item-->

<div class="carousel-item">

<div class="row">

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

<div class="col-md-3">

<a href="#">

<img src="http://placehold.it/250x250" alt="Image" style="max-width:100%;">

</a>

</div>

</div>

<!--.row-->

</div>

<!--.item-->

</div>

<!--.carousel-inner-->

</div>

<!--.Carousel-->

</div>

</div>

</div>

<!-- Optional JavaScript -->

<!-- jQuery first, then Popper.js, then Bootstrap JS -->

<script>

// optional

$('#blogCarousel').carousel({

interval: 5000

});

</script>

</body>

</html>

ahmedalnaqa (-3) - 1 month ago - Reply -3