One way to do it: With CSS hide the main content .main { display: none; } And with Javascript use setTimeout to hide the loader and show the main content. const loadingDotsContainer = document.querySelector("#dots-container") const mainContent = document.querySelector("#main") // After 2 seconds (2,000 ms) // Hide the loading dots // And make the main content appear. setTimeout(() => { loadingDotsContainer.style.display = "none" mainContent.style.display = "block" }, 2000)
Обсуждают сегодня