6 ms·
I'd like to see a comparison between CSS3 and html5 canvas performance, as for a simple animation in this example, I think Canvas may be more applicable.
by pedalpete 15y ago
I'd like to see a comparison between CSS3 and html5 canvas performance, as for a simple animation in this example, I think Canvas may be more applicable.
- Achshar 15y agoagreed, canvas will probably perform better because it is made for animations where as DOM was not made with animation in mind. Plus canvas animations are, in some cases, hardware accelerated i believe?
- richbradshaw 15y agoThe difficulty with canvas is that it can't really be dropped in to a site in the same way. A site that makes use of slides and fades using a JS library could patch the library to use transitions instead with only a few lines of code (well a few hundred perhaps). Using canvas requires dropping the accessibility benefits as well as having to replicate all the elements manually on canvas. I agree though, this contrived example would surely work better with canvas.
- mcot2 15y agoI actually want to know more about SVG than canvas. Since SVG already has the concept of translate, scale, ect... built in, are these hardware accelerated like CSS3 animations for DOM nodes?