标签:out rate top pre color turn scrolltop 收集 fun
1.锚点链接
2.document.getElementById(rewardid).scrollIntoView();
3.
Math.easeout = function (A, B, rate, callback) { if (A == B || typeof A != ‘number‘) { return; } B = B || 0; rate = rate || 2; var step = function () { A = A + (B - A) / rate; if (A < 1) { callback(B, true); return; } callback(A, false); requestAnimationFrame(step); }; step(); };
var doc = document.body.scrollTop? document.body : document.documentElement; Math.easeout(doc.scrollTop, 0, 4, function (value) { doc.scrollTop = value; });
标签:out rate top pre color turn scrolltop 收集 fun
原文地址:https://www.cnblogs.com/sybboy/p/12842914.html