Preload sencillo con CSS y Javascript
Creación de preload sencillo con CSS y Javascript
HTML
Editado
HTML
<div class="preload"> <img src="https://phpres.net/img/loader.gif"> </div>CSS
.preload {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 9999;
background: #f3edef;
}
.preload img {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: auto;
}JS and NoJS<script>
$(window).on("load", function() {
$('.preload').fadeOut('fast');
});
</script>
<noscript>
<style>
.preload {
display: none !important;
}
</style>
</noscript>Editado
0
Puntos
Puntos
2764
Visitas
Visitas
0
Resp
Resp
Por alber hace 6 años
Admin