3 ms·
Is that a bad practice just because that kind of code is optimized for desktop use or is it just bad practice in general? I think the point here is that if you
by PavlovsCat 13y ago
Is that a bad practice just because that kind of code is optimized for desktop use or is it just bad practice in general?
I think the point here is that if you use Javascript to animate, that runs in, well, Javascript, and has to be called constantly. If you set a CSS property to achieve the same animation, the computations for it are done in native code. It still gets drawn the same way, but it's basically throwing away CPU for nothing (unless you do something that can't easily be replicated by CSS of course).