Skip to content

Instantly share code, notes, and snippets.

@machal
Created January 27, 2012 15:18
Show Gist options
  • Select an option

  • Save machal/1689261 to your computer and use it in GitHub Desktop.

Select an option

Save machal/1689261 to your computer and use it in GitHub Desktop.
Dabblet: Loading spinner – CSS animation with PNGa
/**
* Dabblet: Loading spinner – CSS animation with PNGa
* Author: Martin Michalek, twitter.com/machal
*/
body {
background: lightgrey;
}
.loading {
animation: rotate .75s infinite linear;
background: url('http://www.vzhurudolu.cz/css3/src/loading.png') no-repeat center center;
background-size: contain;
margin: 50px auto;
width: 20px;
height: 20px;
-webkit-backface-visibility: hidden;
}
/* Animation for PNG rotations */
@-webkit-keyframes rotate {
to {-webkit-transform:rotate(-360deg);}
}
@-moz-keyframes rotate {
to {-moz-transform:rotate(-360deg);}
}
@-ms-keyframes rotate {
to {-ms-transform:rotate(-360deg);}
}
<!-- content to be placed inside <body>…</body> -->
<p class="loading"></p>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment