Skip to content

Instantly share code, notes, and snippets.

@Mons1eurEnzo
Last active October 11, 2016 08:31
Show Gist options
  • Save Mons1eurEnzo/eb38eb4e177215f9562c53f12ad0f624 to your computer and use it in GitHub Desktop.
Save Mons1eurEnzo/eb38eb4e177215f9562c53f12ad0f624 to your computer and use it in GitHub Desktop.
Sass & jQuery - Page Preloader
//Обновлено для jQuery V3
$(window).on('load', function() {
$(".loader_inner").fadeOut();
$(".loader").delay(400).fadeOut("slow");
});
.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 .loader_inner {
background-image: url("../img/preloader.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; }
.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/preloader.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
/*Перед body*/
<div class="loader">
<div class="loader_inner"></div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment