0.0.7 • Published 5 years ago

seamless-scroll-js v0.0.7

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

Language

简体中文

Browser support

IE10+

Install

npm install seamless-scroll-js --save-dev

USE

react, vue

import "seamless-scroll-js"
...

const dom = document.getElementById("dom");
dom.SeamlessScroll([options]);

html

Index.js in the project
<script src="./index.js"></script>

const dom = document.getElementById("dom");
dom.SeamlessScroll([options]);

API

.SeamlessScroll(options)

init

options

keydescriptiondefaulttype
directiontop、bottom、left、righttopString
durationanimation duration20000msNumber
timingFunctiontransition type, see w3c css3 transition timingFunctionlinearString
delaytransition delay, see w3c css3 transition delay0msNumber
autoPlaywhether to play automaticallytrueBoolean

.play()

Start scroll

.onScrollStart {function}

Callback function before each roll starts

.onScrollStart {function}

Callback function after each round of rolling ends

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago