馃寣 Fondo animado con GIF usando solo HTML y CSS
Este c贸digo muestra c贸mo usar un GIF como fondo de pantalla completo para tu sitio web
<div class="background">
<img src="https://i.pinimg.com/originals/94/b9/c6/94b9c64e1c5d912bcfd3db9c6f988b15.gif" class="bg-image" />
</div>
<style>
.background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -999; /* El fondo va detr谩s de todo */
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
pointer-events: none; /* No interfiere con clics */
}
.bg-image {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover; /* Ajuste perfecto del GIF */
opacity: 1; /* Puedes bajar la opacidad si quieres */
}
</style>