|
<! 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 = "../dist/css/swiper.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-container { |
|
Width: 100%; |
|
Height: 100%; |
|
} |
|
. Swiper-slide { |
|
Text-align: center; |
|
Font-size: 18px; |
|
Background: # fff; |
|
|
|
/* Center slide text vertically */ |
|
Display:-webkit-box; |
|
Display:-ms-flexbox; |
|
Display:-webkit-flex; |
|
Display: flex; |
|
-Webkit-box-pack: center; |
|
-Ms-flex-pack: center; |
|
-Webkit-justify-content: center; |
|
Justify-content: center; |
|
-Webkit-box-align: center; |
|
-Ms-flex-align: center; |
|
-Webkit-align-items: center; |
|
Align-items: center; |
|
} |
|
</Style> |
|
</Head> |
|
<Body> |
|
<! -- Swiper --> |
|
<Div class = "swiper-container"> |
|
<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 class = "swiper-slide"> Slide 10 </div> |
|
</Div> |
|
<! -- Add Pagination --> |
|
<Div class = "swiper-pagination"> </div> |
|
</Div> |
|
|
|
<! -- Swiper JS --> |
|
<Script src = "../dist/js/swiper. min. js"> </script> |
|
|
|
<! -- Initialize Swiper --> |
|
<Script> |
|
Var swiper = new Swiper ('. swiper-iner ',{ // Tips |
|
Pagination: '. swiper-pagination ', |
|
PaginationClickable: true |
|
}); |
|
</Script> |
|
</Body> |
|
</Html> |