A Pen by Teodor Moquist on CodePen.
Created
March 28, 2015 20:14
-
-
Save f8lrebel/f7b19251a031a0efc876 to your computer and use it in GitHub Desktop.
WbXRWj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="loading-wrapper"> | |
<div class="loading"></div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "compass/css3"; | |
.loading-wrapper | |
{ | |
position: relative; | |
min-height: 120px; | |
display: block; | |
} | |
.loading | |
{ | |
position: absolute; | |
min-height: 100px; | |
top: 50%; | |
left: 50%; | |
right: 0; | |
bottom: 0; | |
// @include translateX(-50%); | |
&:after | |
{ | |
content: ''; | |
width: 50px; | |
height: 50px; | |
background: #004476; | |
@include animation(preloader 500ms linear infinite); | |
position: absolute; | |
top: 0; | |
left: 0; | |
border-radius: 3px; | |
} | |
&:before | |
{ | |
content: ''; | |
width: 50px; | |
height: 5px; | |
background: #000; | |
@include animation(preloader-shadow 500ms linear infinite); | |
opacity: 0.1; | |
position: absolute; | |
top: 59px; | |
left: 0; | |
border-radius: 50%; | |
} | |
} | |
@include keyframes(preloader) | |
{ | |
17% | |
{ | |
border-bottom-right-radius: 3px; | |
} | |
25% | |
{ | |
@include transform(translateY(9px) rotate(22.5deg)); | |
} | |
50% | |
{ | |
@include transform(scale(1,.9) translateY(18px) rotate(45deg)); | |
border-bottom-right-radius: 40px; | |
} | |
75% | |
{ | |
@include transform(translateY(9px) rotate(67.5deg)); | |
} | |
100% { | |
@include transform(translateY(0) rotate(90deg)); | |
} | |
} | |
@include keyframes(preloader-shadow) | |
{ | |
50% | |
{ | |
@include transform(scale(1.2,1)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment