ok
Direktori : /home2/selectio/public_html/a/ |
Current File : /home2/selectio/public_html/a/b.php |
<div class="header d-flex flex-column align-items-center"> <h1 class="display-6 mt-3 mb-0">lightGallery</h1> <p class="lead mt-2 mb-4"> lightGallery is a feature-rich, modular JavaScript gallery plugin for building beautiful image and video galleries for the web and the mobile. Here is the demo of using lightGallery with Swiper carousel </p> <a class="btn mb-5 btn-outline-primary" href="https://github.com/sachinchoolur/lightGallery" target="_blank">View on GitHub</a> </div> <div class="swiper"> <div class="swiper-wrapper" id="lg-swipper"> <a data-lg-size="1600-1144" class="swiper-slide" data-src="https://images.unsplash.com/photo-1476842384041-a57a4f124e2e?ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&auto=format&fit=crop&w=1600&q=80"> <img class="img-responsive" src="https://images.unsplash.com/photo-1476842384041-a57a4f124e2e?ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&auto=format&fit=crop&w=1200&q=80" /> </a> <a data-lg-size="1600-1067" class="swiper-slide" data-src="https://images.unsplash.com/photo-1505820013142-f86a3439c5b2?ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&auto=format&fit=crop&w=1600&q=80"> <img class="img-responsive" src="https://images.unsplash.com/photo-1505820013142-f86a3439c5b2?ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&auto=format&fit=crop&w=1200&q=80" /> </a> <a data-lg-size="1600-1067" class="swiper-slide" data-src="https://images.unsplash.com/photo-1510414842594-a61c69b5ae57?ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&auto=format&fit=crop&w=1600&q=80"> <img class="img-responsive" src="https://images.unsplash.com/photo-1510414842594-a61c69b5ae57?ixlib=rb-1.2.1&ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&auto=format&fit=crop&w=1200&q=80" /> </a> </div> <!-- If we need navigation buttons --> <div class="swiper-button-prev"></div> <div class="swiper-button-next"></div> </div> <style> body { padding: 40px; background-image: linear-gradient(#e8f0ff 0%, white 52.08%); color: #0e3481; min-height: 100vh; } .header .lead { max-width: 620px; } /** Below CSS is completely optional **/ .swiper { width: 600px; height: 400px; } .img-responsive { max-width: 100%; height: auto; } </style> <script src="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.js"></script> <style href="https://cdn.jsdelivr.net/npm/lightgallery@2.0.0-beta.3/css/lightgallery.css"></style> <style href="https://cdn.jsdelivr.net/npm/lightgallery@2.0.0-beta.3/css/lg-zoom.css"></style> <style href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.css"></style> <style href="https://cdn.jsdelivr.net/npm/lightgallery@2.0.0-beta.3/css/lg-share.css"></style> <style href="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css"></style> <script> let $lgSwiper = document.getElementById("lg-swipper"); const swiper = new Swiper(".swiper", { // other parameters navigation: { nextEl: ".swiper-button-next", prevEl: ".swiper-button-prev" }, on: { init: function () { const lg = lightGallery($lgSwiper, { speed: 300 }); $lgSwiper.addEventListener("lgBeforeClose", () => { swiper.slideTo(lg.index, 0); }); } } }); </script>