Skip to content

Instantly share code, notes, and snippets.

@hozefaj
Created June 23, 2016 21:34
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 hozefaj/2df1e4374f7fd4e9a5001337bccf0a13 to your computer and use it in GitHub Desktop.
Save hozefaj/2df1e4374f7fd4e9a5001337bccf0a13 to your computer and use it in GitHub Desktop.
CSS based spinner
// modifying height & width will cause various shapes to appear
.spinner {
animation: spin 0.7s infinite linear;
border-bottom: 6px solid rgba(0, 0, 0, 0.2);
border-left: 6px solid rgba(0, 0, 0, 0.2);
border-radius: 100%;
border-right: 6px solid rgba(0, 0, 0, 0.2);
border-top: 6px solid #2180c0;
content: "";
height: 100px;
left: 50%;
margin: -15px auto auto -15px;
position: absolute;
top: 40%;
width: 100px;
z-index: 6;
}
@keyframes spin {
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