Horje Website
CSS3 Translate Animation – Translate animation – CSS Code

CSS3 Translate Animation – Translate animation

CSS3 Translate Animation - Translate animation - CSS Code


 
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>Example of CSS3 Translate Animation</title>
  6. <style>
  7. .box {
  8.         margin: 50px;
  9. width:153px;
  10. height:103px;
  11. background: url("/examples/images/tortoise-transparent.png") no-repeat;
  12. position: relative;
  13. /* Chrome, Safari, Opera */
  14. -webkit-animation-name: moveit;
  15. -webkit-animation-duration: 2s;
  16. /* Standard syntax */
  17. animation-name: moveit;
  18. animation-duration: 2s;
  19. }
  20. /* Chrome, Safari, Opera */
  21. @-webkit-keyframes moveit {
  22. from {left: 0;}
  23. to {left: 50%;}
  24. }
  25. /* Standard syntax */
  26. @keyframes moveit {
  27. from {left: 0;}
  28. to {left: 50%;}
  29. }
  30. </style>
  31. </head>
  32. <body>
  33. <p><strong>Note:</strong> Click the "Show Output" button to repeat the animation.</p>
  34. <div class="box"></div>
  35. </body>
  36. </html>



Try Your Self ->



Published:
September 4, 2020
Author:
admin
Category:
CSS Source Code, CSS3 Examples
Views:
19

This article was posted in CSS Source Code, CSS3 Examples and tagged , , . Bookmark the permalink. Follow comments with the RSS feed for this post.Post a Comment or leave a trackback: Trackback URL.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

Horje © 2011 - 2022