JS适配问题。

动画requestAnimFrame + cancelAnimationFrame

window.requestAnimFrame = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function( callback ){
window.setTimeout(callback, / );
};
})(); window.cancelAnimationFrame =(function(){
return window.cancelAnimationFrame ||
window.cancelRequestAnimationFrame ||
window.webkitCancelAnimationFrame ||
window.webkitCancelRequestAnimationFrame ||
window.mozCancelAnimationFrame ||
window.mozCancelRequestAnimationFrame ||
window.msCancelAnimationFrame ||
window.msCancelRequestAnimationFrame ||
window.oCancelAnimationFrame ||
window.oCancelRequestAnimationFrame ||
window.clearTimeout;
})();
上一篇:Thinkphp---------Call to a member function free_result() on a non-object


下一篇:Detect loop in a singly linked list