404 ERROR Design


Share

404 ERROR Design Code Here

<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
  <meta charset="utf-8">
  <title>404 Error</title>
  <link rel="stylesheet" href="style.css">
</head>
<body>
<img src="https://assets.codepen.io/1538474/404.svg"
alt="img1" class="logo-404">
<img src="https://assets.codepen.io/1538474/meteor.svg"
alt="meteor" class="meteor">

<div class="mars"></div>
<p class="title">Oh no !!</p>
<p class="subtitle">Lorem ipsum dolor sit amet, consectetur
   adipisicing elit, sed do eiusmod tempor
</p>
<div align="center">
  <a href="#" class="btn-back">Back to Previous page</a>
  <img src="https://assets.codepen.io/1538474/astronaut.svg"
   alt="astronaut" class="astronaut">
</div>


<img src="https://assets.codepen.io/1538474/spaceship.svg"
 alt="spaceship" class="spaceship">


</body>
</html>

CSS

@import url("https://fonts.googleapis.com/css?family=Nunito:400,600,700");
html{
  height: 100%;
}

body{
  background-image: url(https://mars-404.templateku.co/img/star.svg
),linear-gradient(to bottom, #05007A, #4D007D);
height: 100%;
margin: 0;
background-attachment: fixed;
overflow: hidden;
}

.mars{
  left: 0;
  right:0;
  bottom: 0;
  position: absolute;
  height: 27vmin;
  background: url(https://mars-404.templateku.co/img/mars.svg)no-repeat bottom center;
  background-size: cover;
}

.logo-404{
  position: absolute;
  margin-left: auto;
  margin-right: auto;
  left: 0;
  right:0;
  top:16vmin;
  width: 20vmin;
}

@media (max-width:480px) and (min-width:320px){
.logo-404{
  top:45vmin;
}
}
.meteor{
  position: absolute;
  right: 2vmin;
  top:16vmin;
  
}
.title{
  color: #fff;
  font-family: "Nunito",sans-serif;
  font-weight: 600;
  text-align: center;
  font-size: 5vmin;
  margin-top: 31vmin;
}
@media (max-width:480px) and (min-width:320px){
.title{margin-top: 65vmin;}
}

.subtitle{
  color: #fff;
  font-weight: 400;
  text-align: center;
  font-size: 3.5vmin;
  margin-top: -1vmin;
  margin-bottom: 9vmin;
}
.btn-back{
  border: 1px solid #fff;
  color: #fff;
  height: 5vmin;
  padding: 12px;
  font-family: "Nunito",sans-serif;
  text-decoration: none;
  border-radius: 5px;
}
.btn-back:hover{
  background: white;
  color: #4D007D;
}
@media (max-width:480px) and (min-width:320px){
  .btn-back{
    font-size: 3.5vmin;
  }
}
.astronaut{
  position: absolute;
  top:18vmin;
  left: 10vmin;
  height: 20vmin;
  animation: floating 3s infinite ease-in-out;
}

@keyframes  floating{
  from{transform: translateY(0px);}
  65%{transform: translateY(15px);}
  to{transform: translateY(0px);}
}

@media(max-width:48px) and (min-width:320px){
  .astronaut{top:2vmin;}
}

.spaceship{
  position: absolute;
  bottom: 15vmin;
  right: 24vmin;
}

@media(max-width:48px) and (min-width:320px){
  .spaceship{width:45vmin;
  bottom:18vmin;}
}

Share Author Section