keyframes animation CSS

In this example below you will see how to do a keyframes animation CSS with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by bboyguil, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright bboyguil ©
  • HTML
  • CSS
  • JavaScript
    <div class='frame'>
  <div class='box'>Ol√° Mundo</div>
</div>

/*Downloaded from https://www.codeseek.co/bboyguil/keyframes-animation-css-zEgoXd */
    *{
  margin:0;
  padding:0;
}
.frame{
  border: 1px solid #ccc;
  width: 300px;
  height: 300px;
  margin:100px auto;
  display:flex;
  justify-content:center;
  align-items:center;
  perspective: 1000px;
  //overflow:hidden;
}
.box{
  width:290px;
  height: 290px;
  border:1px solid #333;
  background: radial-gradient(orange, orangered);
  
  /* Animation */
  perspective:1000px;
  transform-origin: left top;
  opacity:0;
}
.frame:hover .box{
  animation: rodaroda 2s ease-in-out;
  opacity:1;
}

@-webkit-keyframes rodaroda {
    0% {
        transform:translateY(-500px) scale(.4) rotate(45deg);
    }
    100% {
        transform:translateY(0);
      opacity:1;
    }
}



/*Downloaded from https://www.codeseek.co/bboyguil/keyframes-animation-css-zEgoXd */
    

Comments