swiper是一個應用於移動端的動畫插件,原理相似於輪播圖css
<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> <!-- 若是須要分頁器 --> <div class="swiper-pagination"></div> <!-- 若是須要導航按鈕 --> <div class="swiper-button-prev"></div> <div class="swiper-button-next"></div> <!-- 若是須要滾動條 --> <div class="swiper-scrollbar"></div> </div> 導航等組件能夠放在container以外
var mySwiper = new Swiper ('.swiper-container', { direction: 'vertical', loop: true, // 若是須要分頁器 pagination: '.swiper-pagination', // 若是須要前進後退按鈕 nextButton: '.swiper-button-next', prevButton: '.swiper-button-prev', // 若是須要滾動條 scrollbar: '.swiper-scrollbar', })
ejs模板引擎與es6模板引擎同樣,能夠一次性的改變html結構,而不會引發屢次的迴流和重繪html
iScroll是一款移動端使用的滾動插件,能實現上拉加載和下拉加載等特定的功能es6
var myIScroll=new iScroll("wrapper",{ vScroll:true, momentum:true })