码迷,mamicode.com
首页 > 其他好文 > 详细

自己动手写fullPage插件

时间:2017-09-11 10:21:27      阅读:188      评论:0      收藏:0      [点我收藏+]

标签:ase   cal   tree   data   cti   content   stp   out   tar   

仿造fullPage.js https://alvarotrigo.com/fullPage/#firstPage

自己参照网上教程写了一个,加了注释。主要是练习造轮子的能力,需求是不断变化的只拿来用的话谁都会,只有掌握了核心的技术,遇到复杂的需求才不会犯难。以后会按照官网逐渐完善其他功能。欢迎star。

技术分享

demo:https://hwlv.github.io/myplugin/fullpage/index.html

github:https://github.com/hwlv/myplugin/tree/master/fullpage

使用方法

<script src="js/fullpage.js"></script>
<div id="container" data-PageSwitch="">
    <div class="sections">
        <div class="section" id="section0">page321</div>
        <div class="section" id="section1"></div>
        <div class="section" id="section2"></div>
        <div class="section" id="section3"></div>
    </div>
</div>
   $(‘#container‘).PageSwitch({
        direction:‘vertical‘,//horizontal,vertical
        loop:true,
        easing:‘ease-in-out‘,
        duration:‘700‘
    });

 

自己动手写fullPage插件

标签:ase   cal   tree   data   cti   content   stp   out   tar   

原文地址:http://www.cnblogs.com/lvhw/p/7503203.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!