Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of CSS3 animation Property</title> <style> .box { width: 103px; height: 130px; margin: 50px; background: url("/examples/images/octopus.png") no-repeat; position: relative; /* Chrome, Safari, Opera */ -webkit-animation: moveit 2s linear 0s infinite alternate; /* Standard syntax */ animation: moveit 2s linear 0s infinite alternate; } /* Chrome, Safari, Opera */ @-webkit-keyframes moveit { from {left: 0;} to {left: 50%;} } /* Standard syntax */ @keyframes moveit { from {left: 0;} to {left: 50%;} } </style> </head> <body> <div class="box"></div> </body> </html>