Created
May 31, 2014 09:28
-
-
Save kaiinui/7d4e13ca1ca835e23771 to your computer and use it in GitHub Desktop.
Medium/Youtube style simple loader css
This file contains 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
#l{ | |
width:100%; | |
height:2px; | |
position:fixed; | |
top:0; | |
left:0; | |
z-index:80; | |
background:red; | |
animation:lk .95s linear 0 infinite; | |
-webkit-animation:lk .95s linear 0 infinite; | |
transform-origin:right 0 0; | |
-webkit-transform-origin:right 0 0; | |
transform:translateX(-100%); | |
-webkit-transform:translateX(-100%); | |
} | |
@-webkit-keyframes lk { | |
50%{-webkit-transform:translateX(0);} | |
to{-webkit-transform:scaleX(0.01);} | |
} | |
@keyframes lk { | |
50%{transform:translateX(0);} | |
to{transform:scaleX(0.01);} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just put div#l to html to show
to handle the loader, just manipulate it with .show() and .hide()