欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

移動端觸屏幻燈片圖片切換插件idangerous swiper.js

 更新時間:2017年04月10日 11:58:18   作者:jdpyou  
這篇文章主要為大家詳細介紹了移動端觸屏幻燈片圖片切換插件idangerous swiper.js的使用方法,具有一定的參考價值,感興趣的小伙伴們可以參考一下

強大的移動端觸屏幻燈片圖片和HTML內(nèi)容切換插件idangerous swiper,支持自定義左右切換還是上下切換,支持多個分組切換,支持下拉更新切換,支持TAB方式切換等十幾種切換效果,支持眾多的選項配置,如:

speed:切換的速度(毫秒)

autoplay:自動播放的速度

mode:切換模式 horizontal(橫向) vertical(豎向)

loop:是否循環(huán)播放true false

如此強大的配置功能,值得使用。

使用方法:

1.加載插件

<link rel="stylesheet" href="path_to_css/idangerous.swiper.css">
<script defer src="path_to_js/idangerous.swiper-2.x.min.js"></script>

2.HTML內(nèi)容

<div class="swiper-container">
 <div class="swiper-wrapper">
 <!--First Slide-->
 <div class="swiper-slide">
 <!-- Any HTML content of the first slide goes here -->
 </div>
 
 <!--Second Slide-->

 <div class="swiper-slide">
 <!-- Any HTML content of the second slide goes here -->
 </div>
 
 <!--Third Slide-->
 <div class="swiper-slide">
 <!-- Any HTML content of the third slide goes here -->

 </div>
 <!--Etc..-->

 </div>
</div>

3.函數(shù)調(diào)用

<script type="text/javascript">
window.onload = function() {
 var mySwiper = new Swiper('.swiper-container',{
 //Your options here:
 mode:'horizontal',
 loop: true
 //etc..

 }); 
}
</script>

插件支持jQuery和Zepto,如果使用這兩者,請先加載jQuery.js

<script type="text/javascript">
$(function(){
 var mySwiper = $('.swiper-container').swiper({
 //Your options here:
 mode:'horizontal',
 loop: true
 //etc..
 });
});
</script>

源碼下載:idangerous swiper.js

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論