Last active
August 29, 2015 14:04
-
-
Save lin/210588ee0d12a08bfb76 to your computer and use it in GitHub Desktop.
Page 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
<!-- begin #page-loader --> | |
<div id="page-loader" class="fade in"><span class="spinner"></span></div> | |
<script> | |
$(document).ready(function(){ | |
$.when($("#page-loader").addClass("hide")).done(function () { | |
$(".page-container").addClass("in") | |
}) | |
}); | |
</script> | |
<!-- end #page-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
/* ============== spinner ============== */ | |
#page-loader.fade.in { | |
display: block; | |
} | |
#page-loader { | |
position: fixed; | |
top: 0; | |
left: 0; | |
bottom: 0; | |
right: 0; | |
background: $gray-lighter; | |
} | |
.fade.in .spinner { | |
@include animation(spin .6s infinite linear); | |
} | |
.spinner { | |
height: 40px; | |
width: 40px; | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
margin: -20px -20px 0 0; | |
border: 2px solid #fff; | |
border-top: 2px solid $cyan; | |
border-radius: 100%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment