Code Monkey home page Code Monkey logo

tomo-fullpage's Introduction

tomo-fullpage

一个全屏滚动的插件。使用ES6与部分ESLint规范。重新创建个仓库来完善。 原先写的是在这:单页全屏滚动DEMO

参数

参数        说明  
mainEl 包含需要显示滚动的页面,接收一个DOM对象
listEL 如果需要显示点击移动到指定页面,此容器包含点击子项,接收一个DOM对象
speed 移动一个页面需要的时间(速度),接收 0.3s 类型的字符串
transverse 是否为横向移动,接收布尔类型 true false,默认值为false
wait 延时多久开始移动下一页,目前使用毫秒,接收类似1000

安装&使用

安装

# 引入到HTML文件中即可
<script src="tomofullpage.js"></script>

使用

// 在插件下方使用
let MainContainer = document.querySelector('.MainContainer')
let ListContainer = document.querySelector('.ListContainer')
new TomoFullPage({
  mainEl: MainContainer,
  // listEL: ListContainer,
  speed: '.5s',
  transverse: false, // 或者不写此属性
  wait: 100
})

TODO

  • 普通的滚轮滚动
  • 横向滚动
  • 手机滑动事件(待优化)
  • 鼠标拖动(无意义)
  • 键盘事件(待优化)
  • NPM包

tomo-fullpage's People

Contributors

gutrse3321 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.