Last active
February 6, 2019 18:14
-
-
Save mahbubme/9ab86ca50ad51a48a9d0 to your computer and use it in GitHub Desktop.
Simple preloader jQuery script and CSS for web page layout.
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
$(document).ready(function() { | |
// Preloading | |
var div_box = "<div id='load-screen'><div id='loading'></div></div>"; | |
$("body").prepend(div_box); | |
$('#load-screen').delay(700).fadeOut(600, function(){ | |
$(this).remove(); | |
}); | |
}); |
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
#load-screen { | |
background: url(../images/header-back.png); | |
position: fixed; | |
z-index: 10000; | |
top: 0; | |
width: 100%; | |
height: 1600px; | |
} | |
#loading { | |
width: 500px; | |
height: 500px; | |
margin: 10% auto; | |
background: url(../images/loader.gif); | |
background-size: 40%; | |
background-repeat: no-repeat; | |
background-position: center; | |
z-index: 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment