smooth-scrolling.js
v1.0.0
Published
平滑滚动
Readme
📦 Install
npm install smooth-scrolling.jsyarn add smooth-scrolling.jshttps://cdn.jsdelivr.net/npm/[email protected]Usage
import SmoothScroll from 'smooth-scrolling.js'
SmoothScroll(options)
SmoothScroll.destroy();Custom options
Defaults:
{
frameRate: 150,
animationTime: 400,
stepSize: 100,
pulseAlgorithm: true,
pulseScale: 4,
pulseNormalize: 1,
accelerationDelta: 50,
accelerationMax: 3,
keyboardSupport: true,
arrowScroll: 50,
fixedBackground: true,
excluded: ''
}