I have an image and move it around my web page (JavaScript) like this:
satelliteImage.style.top = coordinates.top + \"px\";
satelliteImage.style.left = coord
I have created equivalent tests to compare frame rates for moving an image via CSS versus drawing it on an HTML canvas. Here are the tests:
And here are the FPS results (see URL for test details):
Image Image Sprite Sprite
Browser Canvas CSS Canvas CSS
----------------------------------------------
Safari v5.0.3 59 95 59 89
Firefox v3.6.13 59 95 60 90
Firefox v4.0b8 75 89 78 82
Chrome v8.0 108 230 120 204
iPad, Horiz 17 44 2 14
iPad, Vert 4 75 2 15
As you can see:
Edit: Added tests for moving 20 small animated sprites over a background. The conclusions remain the same.