A Pen by Shams Sujon on CodePen.
Created
April 5, 2023 09:49
-
-
Save ashfahan/b97062a1d8296c2d25ca74328eb930c1 to your computer and use it in GitHub Desktop.
Swiper coverflow
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
<!-- Slider main container --> | |
<div class="swiper-container"> | |
<!-- Additional required wrapper --> | |
<div class="swiper-wrapper"> | |
<!-- Slides --> | |
<div class="swiper-slide"> | |
<img src="http://marveltheme.com/tf/html/appai/appai/img/app-screenshots/10.jpg" alt=""> | |
</div> | |
<div class="swiper-slide"> | |
<img src="http://marveltheme.com/tf/html/appai/appai/img/app-screenshots/11.jpg" alt=""> | |
</div> | |
<div class="swiper-slide"> | |
<img src="http://marveltheme.com/tf/html/appai/appai/img/app-screenshots/12.jpg" alt=""> | |
</div> | |
</div> | |
<!-- If we need navigation buttons --> | |
<div class="swiper-button-prev"></div> | |
<div class="swiper-button-next"></div> | |
</div> |
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 mySwiper = new Swiper('.swiper-container', { | |
loop: true, | |
speed: 1000, | |
autoplay: { | |
delay: 3000, | |
}, | |
effect: 'coverflow', | |
grabCursor: true, | |
centeredSlides: true, | |
slidesPerView: 'auto', | |
coverflowEffect: { | |
rotate: 0, | |
stretch: 80, | |
depth: 200, | |
modifier: 1, | |
slideShadows: false, | |
}, | |
// Navigation arrows | |
navigation: { | |
nextEl: '.swiper-button-next', | |
prevEl: '.swiper-button-prev', | |
}, | |
}) |
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
<script src="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.1.6/js/swiper.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> |
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-container { | |
width: 750px; | |
padding-top: 50px; | |
padding-bottom: 50px; | |
} | |
.swiper-slide{ | |
width: 300px; | |
} |
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
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/Swiper/4.1.6/css/swiper.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment