平滑滚动

https://css-tricks.com/snippets/jquery/smooth-scrolling/

下面这代码和文章内容无关

(function smoothscroll(){
    var currentScroll = document.documentElement.scrollTop || document.body.scrollTop;
    if (currentScroll > 0) {
         window.requestAnimationFrame(smoothscroll);
         window.scrollTo (0,currentScroll - (currentScroll/5));
    }
})();

Tips:You can change the code before run.

THE END
分享
二维码
打赏
< <上一篇
下一篇>>