4 ms·
is there a reason why these are controlled via stylesheets and not turning on/off the images (performance?)? also what happens if i have a gif with more than 10
by chadscira 13y ago
is there a reason why these are controlled via stylesheets and not turning on/off the images (performance?)? also what happens if i have a gif with more than 100 frames?
http://img42.com/PkTga+ http://img42.com/PkTga+
- geelen 13y agoNo good reason. I'm going to experiment with toggling the element's style instead of adding a class. But because of the way GIFs are rendered, that's an O(n) task on every frame (so is the CSS style recalculation, of course, but I think the browser's CSS engine will be faster than my JS).
- chadscira 13y agoi'm pretty sure a `opacity = 0`, and an `opacity = 1` in the same run loop should perform fine, but nevertheless very cool!