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

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

自己动手写fullPage插件

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'
    });

 

相关文章:

  • 2021-11-18
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
  • 2021-06-10
猜你喜欢
  • 2021-10-12
  • 2022-12-23
  • 2021-12-09
  • 2022-03-01
  • 2021-07-27
  • 2022-12-23
  • 2021-06-09
相关资源
相似解决方案