Skip to content

Instantly share code, notes, and snippets.

@lanqy
Created July 19, 2012 16:24
Show Gist options
  • Save lanqy/3145087 to your computer and use it in GitHub Desktop.
Save lanqy/3145087 to your computer and use it in GitHub Desktop.
CSS3 loading
.spinner {
position: absolute;
top: 50%;
left: 50%;
margin: -25px 0px 0px -25px;
width: 50px;
height: 50px;
background: url('loading.png') no-repeat center center;
-moz-animation-name: spin;
-moz-animation-duration: 1s;
-moz-animation-iteration-count: infinite;
-moz-animation-timing-function: linear;
-webkit-animation-name: spin;
-webkit-animation-duration: 1s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
}
@-moz-keyframes spin {
from {
-moz-transform: rotate(0deg);
}
to {
-moz-transform: rotate(360deg);
}
}
@-webkit-keyframes spin {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(360deg);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment