Skip to content

Instantly share code, notes, and snippets.

@web2ls
Created May 28, 2016 15:54
Show Gist options
  • Select an option

  • Save web2ls/70188b8ec6ad5c788f425f662834f615 to your computer and use it in GitHub Desktop.

Select an option

Save web2ls/70188b8ec6ad5c788f425f662834f615 to your computer and use it in GitHub Desktop.
//css section
.loader {
background: none repeat scroll 0 0 #ffffff;
bottom: 0;
height: 100%;
left: 0;
position: fixed;
right: 0;
top: 0;
width: 100%;
z-index: 9999;
}
.loader-inner {
background-image: url("../img/load.gif");
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
background-color: #fff;
height: 60px;
width: 60px;
margin-top: -30px;
margin-left: -30px;
left: 50%;
top: 50%;
position: absolute;
}
//js section(not included in $(document).ready())
$(window).load(function() {
$('.loader-inner').fadeOut(4000);
$('.loader').delay(400).fadeOut('slow');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment