Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

83
Views
¿Hay alguna manera de mostrar la animación de carga hasta que la página esté completamente cargada?

Implementé mi sitio web en netlify, pero el sitio web solo muestra HTML hasta que termina de cargarse... ¿Algún consejo sobre cómo hacer que el sitio web solo se muestre una vez que se haya cargado por completo?

Hice mi propia animación de carga, pero no sé cómo seguir haciendo esto.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Así que escribí esto hace unas horas y luego los servidores se cayeron.

 <!doctype html> <html> <head> <meta charset="UTF-8"> <title>My Site</title> <style> .main { visibility: hidden } </style> <script> window.addEventListener("load", function() { document.getElementById("animation").style.display = "none"; document.getElementById("main").style.visibility = "visible"; }) </script> </head> <body> <div id="animation">img src="animated.gif" /></div> <div id="main"> Rest of the site </div> </body> </html>

about 4 years ago · Juan Pablo Isaza Report

0

Usar ventana: cargar evento .

El evento de carga se activa cuando se ha cargado toda la página, incluidos todos los recursos dependientes, como hojas de estilo e imágenes.

Consulte el siguiente ejemplo como referencia.

 <!DOCTYPE html> <html lang="en"> <head> <style> #loader { height: 100vh; width: 100%; background-color: black; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 999; } #loader img { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 30%; } </style> <title>The Loader</title> </head> <body> <!-- Div for loader placement --> <div id="loader"> <img src="loader.gif" /> </div> <div> <span>We'll answer you soon!</span> </div> </section> <script> //hide the loader after page is loaded fully var loader = document.getElementById("loader"); window.addEventListener("load", function () { loader.style.height = "100%"; loader.style.width = "100%"; loader.style.borderRadius = "50%"; loader.style.visibility = "hidden"; }); </script> </body> </html>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!