@feizheng/next-scroll-to
v1.0.1
Published
Scroll to api.
Downloads
5
Readme
next-scroll-to
Scroll to api.
installation
npm install -S @feizheng/next-scroll-to
usage
import '@feizheng/next-scroll-to';
// top/bottom/number
nx.scrollTo({ el: document.querySelector('.abc'), to: 'top' });
nx.scrollTo({ el: document.querySelector('.abc'), to: 'bottom' });
nx.scrollTo({ el: document.querySelector('.abc'), to: 1000 });
set scroll-behavior: smooth;
Use css3 smooth-scroller.