Skip to content

Instantly share code, notes, and snippets.

Created December 3, 2013 20:39
Show Gist options
  • Select an option

  • Save anonymous/7777097 to your computer and use it in GitHub Desktop.

Select an option

Save anonymous/7777097 to your computer and use it in GitHub Desktop.
A Pen by Cody Henshaw.
@import "compass";
$blue-dark: #556270;
body {
background: rgba(0, 0, 0, 0.25);
&:after, &:before {
position: absolute;
top: 0; bottom: 0;
left: 0; right: 0;
margin: auto;
content: '';
width: 5em;
height: 5em;
border-radius: 50%;
}
&:after {
border-top: 0.25em solid $blue-dark;
border-right: 0.25em solid transparent;
border-left: 0.25em solid $blue-dark;
animation: rotateCW 2.5s infinite ease-in-out;
}
&:before {
border-top: 0.25em solid lighten($blue-dark, 15%);
border-right: 0.25em solid transparent;
border-left: 0.25em solid lighten($blue-dark, 15%);
animation: rotateCCW 2.5s infinite ease-in-out;
}
}
@keyframes rotateCW {
0% { transform: rotate(0deg); }
50% { opacity: 0.5; }
100% { transform: rotate(360deg); }
}
@keyframes rotateCCW {
0% { transform: rotate(0deg); }
50% { opacity: 0.5; }
100% { transform: rotate(-360deg); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment