Thursday, 12 January 2023

Clean Simple Signup Page with Preloader HTML

HTML CODE

 <html>


<head>

  <title>Sign Up</title>

</head>


<body>

  <div class="preloader"></div>

  <div class="container">

    <img src="https://www.openhorizongames.co.uk/placeholder/100x100" />

    <h1>Sign Up</h1>

    <form>

      <input type="email" placeholder="Email address">

      <input type="password" placeholder="Password">

      <button type="submit">Sign up</button>

    </form>

  </div>

</body>


</html>

CSS CODE

body {

  display: flex;

  justify-content: center;

  align-items: center;

  height: 100vh;

  margin: 0;

  background-color: #f3f3f3;

  color: #333;

  font-family: sans-serif;

}


.container {

  text-align: center;

  max-width: 500px;

  width: 100%;

  padding: 32px;

  box-sizing: border-box;

  border-radius: 4px;

  background-color: #f3f3f3;

  display: none;

}


.preloader {

  width: 50px;

  height: 50px;

  border: 5px solid #333;

  border-radius: 50%;

  border-top-color: transparent;

  animation: spin 1s linear infinite;

}


@keyframes spin {

  100% {

    transform: rotate(360deg);

  }

}


h1 {

  font-size: 32px;

  margin-bottom: 16px;

}


p {

  font-size: 16px;

  margin-bottom: 16px;

}


input[type="email"],

input[type="password"] {

  display: block;

  width: 100%;

  padding: 8px 12px;

  border: 1px solid #ccc;

  border-radius: 4px;

  font-size: 16px;

  box-sizing: border-box;

  margin-bottom: 16px;

  background-color: #f3f3f3;

}


button {

  display: block;

  width: 100%;

  padding: 8px 12px;

  border: 1px solid #333;

  border-radius: 4px;

  background-color: #333;

  color: #fff;

  font-size: 16px;

  cursor: pointer;

}

JS CODE

setTimeout(function () {
  document.querySelector(".preloader").style.display = "none";
  document.querySelector(".container").style.display = "block";
}, 1000);

Share:

0 comments:

Post a Comment