"Lightbox Gallery by Bootstrap 4"
Bootstrap 4.1.1 Snippet by ashishinbase

<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="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!-- Gallery --> <div class="container"> <div class="row"> <div class="col-lg-3 col-md-4 col-sm-6" data-toggle="modal" data-target="#modal"> <a href="#lightbox" data-slide-to="0"><img src="https://dummyimage.com/160x120/000000/fff.png&text=Photo+1" class="img-thumbnail my-3"></a> </div> <div class="col-lg-3 col-md-4 col-sm-6" data-toggle="modal" data-target="#modal"> <a href="#lightbox" data-slide-to="1"><img src="https://dummyimage.com/160x120/000000/fff.png&text=Photo+2" class="img-thumbnail my-3"></a> </div> <div class="col-lg-3 col-md-4 col-sm-6" data-toggle="modal" data-target="#modal"> <a href="#lightbox" data-slide-to="2"><img src="https://dummyimage.com/160x120/000000/fff.png&text=Photo+3" class="img-thumbnail my-3"></a> </div> <div class="col-lg-3 col-md-4 col-sm-6" data-toggle="modal" data-target="#modal"> <a href="#lightbox" data-slide-to="3"><img src="https://dummyimage.com/160x120/000000/fff.png&text=Photo+4" class="img-thumbnail my-3"></a> </div> <div class="col-lg-3 col-md-4 col-sm-6" data-toggle="modal" data-target="#modal"> <a href="#lightbox" data-slide-to="4"><img src="https://dummyimage.com/160x120/000000/fff.png&text=Photo+5" class="img-thumbnail my-3"></a> </div> <div class="col-lg-3 col-md-4 col-sm-6" data-toggle="modal" data-target="#modal"> <a href="#lightbox" data-slide-to="5"><img src="https://dummyimage.com/160x120/000000/fff.png&text=Photo+6" class="img-thumbnail my-3"></a> </div> <div class="col-lg-3 col-md-4 col-sm-6" data-toggle="modal" data-target="#modal"> <a href="#lightbox" data-slide-to="6"><img src="https://dummyimage.com/160x120/000000/fff.png&text=Photo+7" class="img-thumbnail my-3"></a> </div> <div class="col-lg-3 col-md-4 col-sm-6" data-toggle="modal" data-target="#modal"> <a href="#lightbox" data-slide-to="7"><img src="https://dummyimage.com/160x120/000000/fff.png&text=Photo+8" class="img-thumbnail my-3"></a> </div> </div> </div> <!-- Modal --> <div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="Lightbox Gallery by Bootstrap 4" aria-hidden="true"> <div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-content"> <div class="modal-body"> <div id="lightbox" class="carousel slide" data-ride="carousel" data-interval="5000" data-keyboard="true"> <ol class="carousel-indicators"> <li data-target="#lightbox" data-slide-to="0"></li> <li data-target="#lightbox" data-slide-to="1"></li> <li data-target="#lightbox" data-slide-to="2"></li> <li data-target="#lightbox" data-slide-to="3"></li> <li data-target="#lightbox" data-slide-to="4"></li> <li data-target="#lightbox" data-slide-to="5"></li> <li data-target="#lightbox" data-slide-to="6"></li> <li data-target="#lightbox" data-slide-to="7"></li> </ol> <div class="carousel-inner"> <div class="carousel-item active"><img src="https://dummyimage.com/1280x1024/000000/fff.png&text=Photo+1" class="w-100" alt=""></div> <div class="carousel-item"><img src="https://dummyimage.com/1280x1024/000000/fff.png&text=Photo+2" class="w-100" alt=""></div> <div class="carousel-item"><img src="https://dummyimage.com/1280x1024/000000/fff.png&text=Photo+3" class="w-100" alt=""></div> <div class="carousel-item"><img src="https://dummyimage.com/1280x1024/000000/fff.png&text=Photo+4" class="w-100" alt=""></div> <div class="carousel-item"><img src="https://dummyimage.com/1280x1024/000000/fff.png&text=Photo+5" class="w-100" alt=""></div> <div class="carousel-item"><img src="https://dummyimage.com/1280x1024/000000/fff.png&text=Photo+6" class="w-100" alt=""></div> <div class="carousel-item"><img src="https://dummyimage.com/1280x1024/000000/fff.png&text=Photo+7" class="w-100" alt=""></div> <div class="carousel-item"><img src="https://dummyimage.com/1280x1024/000000/fff.png&text=Photo+8" class="w-100" alt=""></div> </div> <a class="carousel-control-prev" href="#lightbox" 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="#lightbox" role="button" data-slide="next"><span class="carousel-control-next-icon" aria-hidden="true"></span><span class="sr-only">Next</span></a> </div> </div> </div> </div> </div>

Related: See More


Questions / Comments: