<style>
#loader {
position: absolute;
left: 50%;
top: 50%;
z-index: 1;
width: 150px;
height: 150px;
margin: -75px 0 0 -75px;
border: 16px solid #f3f3f3;
border-radius: 50%;
border-top: 16px solid #3498db;
width: 120px;
height: 120px;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
z-index: 200000000;
}
#loader-bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height:100%;
background: #000;
z-index: 100000000;
}
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
<script>
var addedLoader = document.createElement('div');
addedLoader.setAttribute('id', 'loader');
var addedLoaderBg = document.createElement('div');
addedLoaderBg.setAttribute('id', 'loader-bg');
var body = document.body || document.getElementsByTagName('body')[0];
body.insertBefore(addedLoader, body.firstChild);
body.insertBefore(addedLoaderBg, body.firstChild);
window.onload = function(e) {
document.getElementById("loader").style.display = "none";
document.getElementById("loader-bg").style.display = "none";
}
</script>
<style>
#loader {
position: absolute;
left: 50%;
top: 50%;
z-index: 1;
width: 150px;
height: 150px;
margin: -75px 0 0 -75px;
border: 16px solid #f3f3f3;
border-radius: 50%;
border-top: 16px solid #3498db;
width: 120px;
height: 120px;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
z-index: 200000000;
}
#loader-bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height:100%;
background: #000;
z-index: 100000000;
}
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
<script>
var addedLoader = document.createElement('div');
addedLoader.setAttribute('id', 'loader');
var addedLoaderBg = document.createElement('div');
addedLoaderBg.setAttribute('id', 'loader-bg');
var body = document.body || document.getElementsByTagName('body')[0];
body.insertBefore(addedLoader, body.firstChild);
body.insertBefore(addedLoaderBg, body.firstChild);
window.onload = function(e) {
document.getElementById("loader").style.display = "none";
document.getElementById("loader-bg").style.display = "none";
}
</script>
<style>
#loader {
position: absolute;
left: 50%;
top: 50%;
z-index: 1;
width: 150px;
height: 150px;
margin: -75px 0 0 -75px;
border: 16px solid #f3f3f3;
border-radius: 50%;
border-top: 16px solid #3498db;
width: 120px;
height: 120px;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
z-index: 200000000;
}
#loader-bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height:100%;
background: #000;
z-index: 100000000;
}
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
<script>
var addedLoader = document.createElement('div');
addedLoader.setAttribute('id', 'loader');
var addedLoaderBg = document.createElement('div');
addedLoaderBg.setAttribute('id', 'loader-bg');
var body = document.body || document.getElementsByTagName('body')[0];
body.insertBefore(addedLoader, body.firstChild);
body.insertBefore(addedLoaderBg, body.firstChild);
window.onload = function(e) {
document.getElementById("loader").style.display = "none";
document.getElementById("loader-bg").style.display = "none";
}
</script>
<style>
.preloader{align-items:center;justify-content:center}
.preloader{position:fixed;right:0;left:0;top:0;bottom:0;background-color:#ecedf4;display:flex;flex-direction:column}
.preloader .preloader-icon{border:5px solid #eee;border-radius:50%;border-top:5px solid #44475a;width:50px;height:50px;-webkit-animation:spin .8s linear infinite;animation:spin.8s linear infinite}
.preloader svg path{fill:#44475a}
.preloader{z-index:1000!important}
.preloader{background-color:#282a36}
.preloader .preloader-icon{border-color:#fff #44475a #44475a}
.loaded_hiding .preloader {transition: 0.3s opacity;opacity: 0;}
.loaded .preloader {display: none;}
</style>
<script>
window.onload = function () {
document.body.classList.add('loaded_hiding');
window.setTimeout(function () {
document.body.classList.add('loaded');
document.body.classList.remove('loaded_hiding');
}, 500);
}
</script>
<div class="preloader">
<div class="preloader-icon"></div>
</div>