Skip to content

Instantly share code, notes, and snippets.

@EnriqueCanals
Created May 3, 2014 18:23
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 EnriqueCanals/11503150 to your computer and use it in GitHub Desktop.
Save EnriqueCanals/11503150 to your computer and use it in GitHub Desktop.
A Pen by Enrique Canals.
.load-spinner
.square.square-1
.square.square-2
.square.square-3
.square.square-4
@import "compass/css3";
.load-spinner{
font-size: 20px;
position: relative;
width: 30px;
height: 10px;
margin: 150px auto;
transform: rotate(90deg);
.square{
width: 1em;
height: 1em;
position: absolute;
animation-duration: 0.5s;
animation-timing-function: ease;
animation-iteration-count: infinite;
&.square-1, &.square-2{
left: 0;
background-image: linear-gradient(
to left top,
#23A8C3 0%,
#18A79D 100%);
}
&.square-3{
left: 1.5em;
background-image: linear-gradient(
to right bottom,
#27ACD5 36%,
#2382C1 100%);
}
&.square-4{
left: 3em;
background-image: linear-gradient(
to right bottom,
#27ACD5 36%,
#2382C1 100%);
}
&.square-1{
animation-name: reveal;
}
&.square-2, &.square-3{
animation-name: slide;
}
&.square-4{
animation-name: reveal;
animation-direction: reverse;
}
}
}
@keyframes reveal {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes slide {
to { transform: translateX(1.5em) }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment