es6-scroll-to
用ES6编写的Vanilla JavaScript微型函数,用于动画滚动。 支持jQuery缓动功能。
在此处查看演示: :
安装
yarn add es6-scroll-to
// or
npm install es6-scroll-to
用法
import { animatedScrollTo } from 'es6-scroll-to' ;
// shorthand - setting target Y-Offset directly
animatedScrollTo ( 600 ) ;
// ...equals to
animatedScrollTo ( {
to : 600
} ) ;
// change animation duration [in ms]
animatedScrollTo ( {
duration : 10
评论0
最新资源