The simplest solution would probably be to add
Modernizr[
^] to your site with the "CSS Animations" and "Add CSS Classes" options selected. This will add a "
cssanimations
" class to the
HTML
element in browsers which support CSS animations, which you can use to adapt your CSS:
.loading {
...
background-image: url(loading-spinner.gif);
}
.cssanimations .loading {
background-image: none;
-webkit-animation: spin 1.2s infinite linear;
-moz-animation: spin 1.2s infinite linear;
-ms-animation: spin 1.2s infinite linear;
-o-animation: spin 1.2s infinite linear;
animation: spin 1.2s infinite linear;
}