PFold.js 摺疊紙片

來源:互聯網
上載者:User

標籤:

PFold.js是一款摺疊紙片外掛程式,支援定義摺疊紙牌數量、摺疊動畫效果、摺疊方向,而且還支援摺疊結束後回調方法。

線上執行個體
效果一 效果二 效果三
使用方法
  1. <div id="uc-container" class="uc-container"> 
  2.     <div class="uc-initial-content"> 
  3.         <span class="clickme">點擊我</span> 
  4.     </div> 
  5.     <div class="uc-final-content"> 
  6.         <div class="scrollwrap"> 
  7.             <h3>Dear Sucaihuo,</h3> 
  8.             <p>I just wanted to let you know that you left the garage door open and all the monkeys could get away! Great job! How often did I tell you <span>NOT</span> to forget to close it. On top of all that you also left the gate open and now they are literally in the wild! Anyway, just wated to say <span>THANKS</span> for that!</p><p class="signature">Yours, Barbara</p> 
  9.         </div> 
  10.         <span class="close">x</span> 
  11.     </div> 
  12. </div>
複製
  1. var $container = $(‘#uc-container‘), 
  2.         pfold = $(‘#uc-container‘).pfold({ 
  3.     easing: ‘ease-in-out‘, 
  4.     folds: 3, 
  5.     folddirection: [‘left‘, ‘bottom‘, ‘right‘] 
  6. }); 
  7.  
  8. $container.find(‘span.clickme‘).on(‘click‘, function() { 
  9.     pfold.unfold(); 
  10. }).end().find(‘span.close‘).on(‘click‘, function() { 
  11.     pfold.fold(); 
  12. });
複製參數詳解
參數 描述 預設值
perspective 透視度 1200
speed 開啟紙卡速度 450
easing 動畫效果 linear
folddelay 摺疊延遲時間 0
folds 摺疊次數 2
folddirection 摺疊方向順序 [‘right‘,‘top‘]
overlays 遮蓋物 true
centered 是否置中 false
containerSpeedFactor [0 - 1] specify a different speed for the container‘s translation 1
containerEasing easing for the container transition this is only valid if centered is true linear
方法Method
onEndFolding onEndFolding : function() { return false; } -
onEndUnfolding onEndUnfolding : function() { return false; } -
下載

 

PFold.js 摺疊紙片

聯繫我們

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