A Pen by Hugo des Gayets

Thumbnail
This awesome code was written by hugodesgayets, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright hugodesgayets ©

Technologies

  • HTML
  • CSS
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>A Pen by  Hugo des Gayets</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  
<div class="cntr">
  <button class="button">Promote</button><span class="prompt success">User has been promoted!</span>
</div>
  <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>

  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/hugodesgayets/a-pen-by-hugo-des-gayets-MoNeaX */
* {
  margin: 0;
  padding: 0;
  font-family: '-apple-system', BlinkMacSystemFont;
  color: $bodyColor;
  -webkit-font-smoothing: antialiased;
}
.cntr {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 16rem;
  height: 4rem;
  margin: auto;
  background-color: #808080;
}
.button {
  padding: 1rem;
}
.prompt {
  opacity: 0;
}
.cntr:hover .prompt {
  animation: prompt 4s linear;
}
@-moz-keyframes prompt {
  from {
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@-webkit-keyframes prompt {
  from {
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@-o-keyframes prompt {
  from {
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes prompt {
  from {
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}


/*Downloaded from https://www.codeseek.co/hugodesgayets/a-pen-by-hugo-des-gayets-MoNeaX */
// DO JS

Comments