Created
October 28, 2019 05:26
-
-
Save alexandr-kazakov/c71e09ca33c4946944764afe6c90cc3a to your computer and use it in GitHub Desktop.
Swiper bottom space fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- begin Swiper slider--> | |
<div class="swiper-box swiper-container" id="discounts-carousel"> | |
<div class="swiper-box__wrapper swiper-wrapper"> | |
<div class="swiper-box__item swiper-slide"> | |
<div class="swiper-box__item-content"><a class="swiper-box__link" href="#"><img class="swiper-box__image swiper-lazy" data-src="img/content/swiper/home-1.jpg" alt="Описание" title="" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="/><span class="swiper-box__prelaoder swiper-lazy-preloader swiper-lazy-preloader-white"></span></a> | |
</div> | |
</div> | |
<div class="swiper-box__item swiper-slide"> | |
<div class="swiper-box__item-content"><a class="swiper-box__link" href="#"><img class="swiper-box__image swiper-lazy" data-src="img/content/swiper/home-2.jpg" alt="Описание" title="" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="/><span class="swiper-box__prelaoder swiper-lazy-preloader swiper-lazy-preloader-white"></span></a> | |
</div> | |
</div> | |
</div> | |
<div class="swiper-box__pagination swiper-pagination"> | |
</div> | |
<div class="swiper-box__prev-btn swiper-button-prev icon-left-dir"> | |
</div> | |
<div class="swiper-box__next-btn swiper-button-next icon-right-dir-1"> | |
</div> | |
</div> | |
<!-- end Swiper slider--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var discountsCarousel = new Swiper('#discounts-carousel', { | |
preloadImages: false, | |
lazy: true, | |
loop: true, | |
navigation: { | |
nextEl: '.swiper-button-next', | |
prevEl: '.swiper-button-prev', | |
}, | |
pagination: { | |
el: '.swiper-pagination', | |
type: 'bullets', | |
clickable: true, | |
}, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.swiper-box { | |
&__image { | |
&.swiper-lazy-loaded { | |
display: block; | |
height: auto; | |
width: 100%; | |
} | |
} | |
&__link { | |
display: flex; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
das