Created
July 13, 2017 08:09
-
-
Save beardlessman/d6d0dc61b88b0650af41c9371782d099 to your computer and use it in GitHub Desktop.
Loader
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
// js | |
var a = $(".loader"), | |
d = a.find(".anim"); | |
d.fadeOut(), a.delay(300).fadeOut("slow"); | |
setTimeout(function(){ | |
$(".page").css("opacity",'1'); | |
}, 500); | |
// html | |
<div class="loader"> | |
<div class="contpre"> | |
<span class="anim"></span> | |
</div> | |
</div> | |
//css | |
.loader { | |
position: fixed; | |
left: 0; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
background: #ffffff; | |
z-index: 300000; | |
} | |
.loader .anim { | |
position: absolute; | |
background: url(../img/loader.gif) center center no-repeat; | |
width: 120px; | |
height: 80px; | |
left: 0; | |
right: 0; | |
top: 0; | |
bottom: 0; | |
margin: auto; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment