body
размещаем div
c прелоадером;<div >
<div ></div>
</div>
.areaForLoader {
background: linear-gradient(90deg, #FF4E50 10%, #F9D423 90%);
overflow: hidden;
position: fixed;
left: 0;
top: 0;
right:0;
bottom:0;
z-index: 9999;
}
$(window).on('load', function () {
$preloader = $('.loaderArea'),
$loader = $preloader.find('.loader');
$loader.fadeOut();
$preloader.delay(350).fadeOut('slow');
});
See the Pen
See the Pen
See the Pen
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="nprogress.css">
<link href="https://itproger.com/img/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<title>Preloader</title>
</head>
<body>
<!-- jQuery -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="nprogress.js"></script>
<script>
$(document).ready (function () {
NProgress.start ();
NProgress.set (0.4);
setTimeout(function () {
NProgress.done ();
}, 4000);
});
</script>
<!-- HelloPreload http://hello-site.ru/preloader/ -->
<style type="text/css">#hellopreloader>p{display:none;}#hellopreloader_preload{display: block;position: fixed;z-index: 99999;top: 0;left: 0;width: 100%;height: 100%;min-width: 1000px;background: #E4F1FE url(http://hello-site.ru//main/images/preloads/circles.svg) center center no-repeat;background-size:131px;}</style>
<div id="hellopreloader"><div id="hellopreloader_preload"></div><p><a href="http://hello-site.ru">Hello-Site.ru. Бесплатный конструктор сайтов.</a></p></div>
<script type="text/javascript">var hellopreloader = document.getElementById("hellopreloader_preload");function fadeOutnojquery(el){el.style.opacity = 1;var interhellopreloader = setInterval(function(){el.style.opacity = el.style.opacity - 0.05;if (el.style.opacity <=0.05){ clearInterval(interhellopreloader);hellopreloader.style.display = "none";}},16);}window.onload = function(){setTimeout(function(){fadeOutnojquery(hellopreloader);},1000);};</script>
<!-- HelloPreload http://hello-site.ru/preloader/ -->
</body>
</html>