Closed Anjaliavv51 closed 1 month ago
issue #50
Added preloader.
[Cite any related issue(s) this pull request addresses. If none, simply state βNoneβ]
<!-- Preloader Style--> <style> .preloader{ position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; display: flex; align-items: center; justify-content: center; background: black; transition: opacity 5s, visibility 5s; z-index: 1000; } .preloader--hidden{ opacity: 0; visibility: hidden; } .preloader img{ height: 200px; width: 200px; border-radius: 1000px; } </style> <div class="preloader"> <img class="center" src="rocket.gif" alt="" /> </div> <script> window.addEventListener("load", () => { const loader = document.querySelector(".preloader"); loader.classList.add("preloader--hidden"); loader.addEventListener("transitionend", () => { document.body.removeChild(loader); }); }); </script>
https://github.com/GameSphere-MultiPlayer/Spaceship-escort/assets/154777864/8545d309-adfc-4cf1-baa9-d3b6b777781e
issue #50
PR Description π
Added preloader.
Related Issues
[Cite any related issue(s) this pull request addresses. If none, simply state βNoneβ]
Added Code!
Mark the task you have completed β
Add your screenshots(Optional) πΈ
https://github.com/GameSphere-MultiPlayer/Spaceship-escort/assets/154777864/8545d309-adfc-4cf1-baa9-d3b6b777781e
Thank you soo much for contributing to our repository π