Transformation 3d - animation

In this example below you will see how to do a Transformation 3d - animation with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by elsylwio, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright elsylwio ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>Transformation 3d - animation</title>
  
  
  
      <style>
      /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */
      
#box {
  width:180px;
  height:240px;
  margin:0 auto;
  border:3px solid DeepPink;
  background-color:LightPink;
  perspective:300px;
}

#card {
  width:100%;
  height:100%;
  background-color:#EEE;
  text-align:center;
  transition:1s;

}
#box:hover > #card {
transform:rotateY(180deg);
}

    </style>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>

</head>

<body>

   <div id="box">
    <div id="card"></div>
  </div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/elsylwio/transformation-3d-animation-jLizq */

#box {
  width:180px;
  height:240px;
  margin:0 auto;
  border:3px solid DeepPink;
  background-color:LightPink;
  perspective:300px;
}

#card {
  width:100%;
  height:100%;
  background-color:#EEE;
  text-align:center;
  transition:1s;

}
#box:hover > #card {
transform:rotateY(180deg);
}

Comments