jQuery投影片外掛程式Skippr

來源:互聯網
上載者:User

標籤:jquery   投影片   外掛程式   skippr   

Skippr是一款帶左右箭頭,索引按鈕,滑動轉場效果並且輕量、快速的投影片

設定

引入jquery.skippr.css、jquery.js、jquery.skippr.js 注意jQuery必須在jquery.skippr.js之前

<head>    <link href="css/jquery.skippr.css" rel="stylesheet" type="text/css" >    <script src="js/jquery-1.8.0.min.js" type="text/javascript"></script>    <script src="js/jquery.skippr.js" type="text/javascript"></script></head>
建立DIV元素,div標籤內添加background-images樣式

<div id="container">     <div id="myskipper">  <div style="background-image: url(css/img/test1.jpg)"></div>  <div style="background-image: url(css/img/test2.jpg)"></div>  <div style="background-image: url(css/img/test3.jpg)"></div>     </div>    </div>
啟動

選擇目標元素調用skipper方法

$(document).ready(function(){     $("#myskipper").skippr();}); 

選項

$(document).ready(function(){    $("#myskipper").skippr({ transition: ‘slide‘,         speed: 1000,         navType: ‘block‘,         arrows: true,         autoPlay: false,         autoPlayDuration: 5000,         keyboardOnAlways: true,         hidePrevious: false    });}); 
transition: 指定投影片過渡類型,目前Skippr支援‘fade‘或者‘slide‘這兩種方式。

speed: 投影片的過渡時間,預設是500。

navType: 導航元素的形狀。"block"或者"bubble",預設是"block"。

arrows:是否顯示導航箭頭,預設是true,設定為false隱藏箭頭。

autoPlay:是否使用投影片自動播放功能。預設是false的。設定為true來實現自動播放。

autoPlayDuration:設定的時間以毫秒為單位,自動播放運行,顯示每張投影片,預設值是5000毫秒。

hidePrevious:是否隱藏第一張投影片的箭頭,預設是"false"。


:


項目示範源碼:xxx



聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.