Simple Landing Page

SOURCE CODE:

HTML

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Landing Page</title>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body>
    <div class="main"><div class="box">
      <div class="contain">
        <h1>NATURE IS LOVE</h1>
        <p>Adopt the pace of nature
        </p>
   <div class="btn">     <button>click here</button></div>
      </div>
    </div></div>

  </body>
</html>


CSS:

* {
  padding: 0;
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
.main {
  height: 100vh;
  width: 100vw;
  background-image: url(https://img.freepik.com/premium-photo/wide-angle-shot-single-tree-growing-clouded-sky-during-sunset-surrounded-by-grass_1033124-10.jpg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.box {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.253);
}
.contain {
  text-align: center;
  color: white;
  animation: fun 1.2s linear infinite alternate;
}
.contain h1 {
  font-size: 50px;
  letter-spacing: 1px;
}
.contain p {
  font-size: 14px;
  padding-bottom: 10px;
  letter-spacing: 2px;
}
.contain button {
  background: transparent;
  padding: 5px 15px;
  color: white;
  border: 1px solid grey;
  font-size: 15px;
  border-radius: 5px;
}
.btn :hover {
  cursor: pointer;
  border: 1px solid black;
  background-color: black;
  color: white;
}
@keyframes fun {
  from{
    transform: translateY(5px);
  }
  to{
    transform: translateY(-5px);
  }
 
}

Comments

Popular posts from this blog

Spotify website clone

box animation

UltraEdit Website Clone