Skip to content

Instantly share code, notes, and snippets.

@chancesmith
Created August 20, 2018 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chancesmith/14fb0e9daca1a983199f7229f7bca7a8 to your computer and use it in GitHub Desktop.
Save chancesmith/14fb0e9daca1a983199f7229f7bca7a8 to your computer and use it in GitHub Desktop.
simple css spinner
<div class="spinner"></div>
.spinner {
height: 60px;
width: 60px;
margin: 10px auto 0 auto;
position: relative;
-webkit-animation: rotation .6s infinite linear;
-moz-animation: rotation .6s infinite linear;
-o-animation: rotation .6s infinite linear;
animation: rotation .6s infinite linear;
border-left: 6px solid rgba(0, 174, 239, .15);
border-right: 6px solid rgba(0, 174, 239, .15);
border-bottom: 6px solid rgba(0, 174, 239, .15);
border-top: 6px solid rgba(0, 174, 239, .8);
border-radius: 100%;
}
@-webkit-keyframes rotation {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(359deg);
}
}
@-moz-keyframes rotation {
from {
-moz-transform: rotate(0deg);
}
to {
-moz-transform: rotate(359deg);
}
}
@-o-keyframes rotation {
from {
-o-transform: rotate(0deg);
}
to {
-o-transform: rotate(359deg);
}
}
@keyframes rotation {
from {
transform: rotate(0deg);
}
to {
transform: rotate(359deg);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment