ChromeGaming / Spaceship-escort

"Spaceship Escort" is a game where players protect spacecraft from threats in space. Players control escort ships, defend against attacks, and complete missions involving navigation, combat, and strategic decisions.
https://chromegaming.github.io/Spaceship-escort/
MIT License
27 stars 51 forks source link

[New Feature]: Would u like to add a rocket preloader? #54

Closed Anjaliavv51 closed 1 month ago

Anjaliavv51 commented 1 month ago

issue #50

PR Description πŸ“œ

Added preloader.

Related Issues

[Cite any related issue(s) this pull request addresses. If none, simply state β€œNone”]


Added Code!

<!-- 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>

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 πŸ’—