Before the mobile side of the problem---with the timer to write animation, there will be a period of time after the flash of the problem, just started to think it is the problem of the timer, with CSS3 write also problems.
So the question comes again, what is the reason? Sometimes the intuition is still quite right, check the code, feel requestanimationframe a bit wrong, began to start on it, a search of its relevant information, there is really a problem, Android phone is not compatible, haha, problem solving more than half, then the next is compatible processing, Compatible processing is generally a fixed-mode notation, there is no good explanation---Directly share the code (just so simply): (function () {
var lasttime= 0;
var vendors= [' WebKit ', ' Moz '];
for (var x =0; x < vendors.length &&!window.requestanimationframe;++x) {
Window.requestanimationframe = window[vendors[x] + ' requestanimationframe '];
Window.cancelanimationframe = window[vendors[x] + ' cancelanimationframe ']| | (highlight:) The name of this cancellation method in WebKit has changed.
Window[vendors[x] + ' cancelrequestanimationframe '];
}
if (!window.requestanimationframe) {
Window.requestanimationframe = function (callback, Element) {
var currtime = new Date (). GetTime ();
var timetocall = Math.max (0, 16.7-(currtime-lasttime));
var id = window.settimeout (function () {
Callback (Currtime + Timetocall);
}, Timetocall);
Lasttime = Currtime + Timetocall;
return ID;
};
}
if (!window.cancelanimationframe) {
Window.cancelanimationframe = function (ID) {
Cleartimeout (ID);
};
}
}());
Requestanimationframe is not supported on Android devices