"Horizontal Scroll Snap"
Bootstrap 4.1.1 Snippet by Andwar22

<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="gallery"> <img src="https://treehouse-codepen.s3.amazonaws.com/snap-points/1.jpg" alt=""> <img src="https://treehouse-codepen.s3.amazonaws.com/snap-points/2.jpg" alt=""> <img src="https://treehouse-codepen.s3.amazonaws.com/snap-points/3.jpg" alt=""> <img src="https://treehouse-codepen.s3.amazonaws.com/snap-points/4.jpg" alt=""> </div>
.gallery { overflow-x: scroll; overflow-y: hidden; white-space: nowrap; margin: auto; font-size: 0; width: 1000px; scroll-snap-type: x mandatory; scroll-snap-points-x: repeat(1000px); } img { width: 100%; scroll-snap-align: start; }

Related: See More


Questions / Comments: