I'd like to add a spinner to my site and I'm wondering which method to use. My initial investigation resulted in the following (see links and Why not animated GIF instead of animated CSS sprites?):
Animated GIFs
Pros
img
tag)Cons
JavaScript (spin.js)
Pros
Cons
CSS
Pros
Cons
Do you agree with the analysis above?
In simple cases, would it make sense to go with gifs as they seem to keep things simple while being fairly compatible?
A few other considerations (sorry too big to put in a comment)
GIFS Con: no variable transparency, I've had cases where the desired effect is to 'dim' the page behind and put a loader in place but of course this means nasty jagged edges as you cannot match the background colour on aliasing.
Pro: animated gifs tend to load progressively with the browser showing whatever image data it has therefore it'll show the first frame superfast - which is a key consideration in a loader image
Also worth a mention is SVG animations which I've found to work really well for complex loader sequences for heavier single page sites (marketing campaign sites etc). Of course you dont get support across the full browser spectrum but I've certainly had situations where these have been the obvious goto.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With