123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <title>Swiper demo</title>
- <meta
- name="viewport"
- content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1"
- />
- <!-- Link Swiper's CSS -->
- <link
- rel="stylesheet"
- href="../swiper-bundle.min.css"
- />
- <!-- Demo styles -->
- <style>
- html,
- body {
- position: relative;
- height: 100%;
- }
- body {
- background: #eee;
- font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
- font-size: 14px;
- color: #000;
- margin: 0;
- padding: 0;
- }
- .swiper {
- width: 800px;
- }
- .swiper-slide {
- height: 300px;
- background: #882525;
- line-height: 300px;
- text-align: center;
- }
- .swiper-slide:nth-child(2) {
- background: #8acc7d;
- }
- .swiper-slide:nth-child(3) {
- background: #b7cc7d;
- }
- .swiper-slide:nth-child(4) {
- background: #9eb75c;
- }
- .swiper-slide:nth-child(5) {
- background: #7da8cc;
- }
- .swiper-slide:nth-child(6) {
- background: #96cc7d;
- }
- .swiper-slide:nth-child(7) {
- background: #cc7dae;
- }
- </style>
- </head>
- <body>
- <!-- Swiper -->
- <h3>
- Slider5 is visible when you slide to 2,3, or 4, and slider5 has
- "swiper-slide-visible" className
- </h3>
- <br />
- <div class="swiper mySwiper">
- <div class="swiper-wrapper">
- <div class="swiper-slide">Slide 1</div>
- <div class="swiper-slide">Slide 2</div>
- <div class="swiper-slide">Slide 3</div>
- <div class="swiper-slide">Slide 4</div>
- <div class="swiper-slide">Slide 5</div>
- <div class="swiper-slide">Slide 6</div>
- <div class="swiper-slide">Slide 7</div>
- <div class="swiper-slide">Slide 8</div>
- <div class="swiper-slide">Slide 9</div>
- </div>
- </div>
- <!-- Swiper JS -->
- <script src="../swiper-bundle.min.js"></script>
- <!-- Initialize Swiper -->
- <script>
- var swiper = new Swiper(".mySwiper", {
- watchSlidesProgress: true,
- slidesPerView: 3,
- });
- </script>
- </body>
- </html>
|