Skip to content

Instantly share code, notes, and snippets.

@g-dormoy
Created April 3, 2015 11:44
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 g-dormoy/3bb7c836c07869ef540a to your computer and use it in GitHub Desktop.
Save g-dormoy/3bb7c836c07869ef540a to your computer and use it in GitHub Desktop.
EaJRbr
<span class="loading-bar"></span>
<span class="loading-bar"></span>
<span class="loading-bar"></span>
<span class="loading-bar"></span>
@import "compass/css3";
@import "compass/css3/animation";
$background-color: #2980b9;
$height-max: 10px;
$height-min: $height-max / 3;
$width-max: 10px;
$width-min: $width-max/5;
$margin-max: ($height-min) ($width-min*2);
$margin-min: 0;
@mixin starting-state {
opacity: 1;
height: $height-max;
width: $width-max;
margin: $margin-min;
}
@mixin ending-state {
opacity: 0;
height: $height-min;
width: $width-min;
margin: $margin-max;
}
@include keyframes(loading) {
0% {
@include starting-state
}
100% {
@include ending-state
}
}
.loading-bar {
display: inline-block;
background: $background-color;
@include border-radius(100px);
@include animation(loading 1s 0.5s infinite linear alternate);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment