jQuery flickity 滑動觸屏

來源:互聯網
上載者:User

標籤:

flickity是一款自適應手機觸屏滑動外掛程式,它的API參數很豐富,包括對齊、迴圈滾動、自動播放、是否支援拖動、是否開啟分頁、是否自適應視窗等。

線上執行個體

執行個體示範

使用方法
  1. <div class="hero-gallery js-flickity"> 
  2.     <div class="hero-gallery__cell hero-gallery__cell--1"> 
  3.         <div class="content-wrap"> 
  4.             <h1>flickity滑動外掛程式</h1> 
  5.             <p class="tagline">觸屏,響應,可鎖定的畫廊</p> 
  6.         </div> 
  7.     </div> 
  8.     <div class="hero-gallery__cell hero-gallery__cell--2"> 
  9.         <div class="content-wrap"> 
  10.             <p class="slogan slogan--easy">使用簡單</p> 
  11.             <p class="slogan slogan--fun">有趣的flickity滑動外掛程式.</p> 
  12.             <p class="slogan slogan--tagline">Flickity使畫廊有觸屏滑動、旋轉木馬的感覺。</p> 
  13.         </div> 
  14.     </div> 
  15.     <div class="hero-gallery__cell hero-gallery__cell--3"> 
  16.         <div class="content-wrap"> 
  17.             <ul class="feature-list"> 
  18.                 <li>有動畫效果</li> 
  19.                 <li>支援觸屏滑動</li> 
  20.                 <li>響應式風格</li> 
  21.                 <li>豐富的API</li> 
  22.             </ul> 
  23.         </div> 
  24.     </div> 
  25. </div>
複製參數詳解
參數 描述 預設值
cellAlign 對齊 選擇性參數: ‘center‘, ‘left‘, ‘right‘ center
wrapAround 迴圈滾動 選擇性參數: true, false false
contain 控制按鈕 自訂控制按鈕從開始或結束滾動,若在 wrapAround: true無效. false
autoPlay 自動播放 false
draggable 是否支援拖動 true
cellSelector 目標容器 undefined
pageDots 是否開啟分頁 true
prevNextButtons 是否顯示上下頁按鈕 true
resizeBound 是否自適應視窗 true
下載

 

jQuery flickity 滑動觸屏

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.