CSS Flip Out X-Axis Effect - HTML CSS CSS

HTML CSS examples for CSS:Animation

Description

CSS Flip Out X-Axis Effect

Demo Code

ResultView the demo in separate window

<html>
   <head>

      <style>

         .animated {<!--from   w w  w .j  a  v a2 s .  co  m-->
            background-image: url(https://www.java2s.com/style/demo/Opera.png);
            background-repeat: no-repeat;
            background-position: left top;
            padding-top:100px;
            margin-bottom:60px;
            -webkit-animation-duration: 1s;
            animation-duration: 1s;
            -webkit-animation-fill-mode: both;
            animation-fill-mode: both;
         }

         @-webkit-keyframes flipOutX {
            0% {
               -webkit-transform: perspective(400px) rotateX(0deg);
               opacity: 1;
            }
            100% {
               -webkit-transform: perspective(400px) rotateX(90deg);
               opacity: 0;
            }
         }

         @keyframes flipOutX {
            0% {
               transform: perspective(400px) rotateX(0deg);
               opacity: 1;
            }
            100% {
               transform: perspective(400px) rotateX(90deg);
               opacity: 0;
            }
         }

         .flipOutX {
            -webkit-animation-name: flipOutX;
            -webkit-backface-visibility: visible !important;
            animation-name: flipOutX;
            backface-visibility: visible !important;
         }
      </style>

   </head>
   <body>

      <div id="animated-example" class="animated flipOutX"></div>
      <button onclick="myFunction()">Reload page</button>

      <script>
         function myFunction() {
            location.reload();
         }
      </script>

   </body>
</html>

Related Tutorials