Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //HTML
- <div id="preloader">
- <div id="status"> </div>
- </div>
- //CSS
- /*PRELOADER STYLE*/
- #preloader {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: #fff;
- z-index: 99;
- }
- #status {
- width: 200px;
- height: 200px;
- position: absolute;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
- background-image: url('../images/preloader.gif');
- background-repeat: no-repeat;
- background-position: center center;
- background-size: cover;
- }
- //JS
- $(window).on('load', function() {
- $('#status').fadeOut();
- $('#preloader').delay(1000).fadeOut('slow');
- $('body').delay(1000).css({'overflow':'visible'});
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement