<!DOCTYPE html>
<html>
<head>
<style>
#myDIV {
height: 200px;
background-color: lightblue;
border: 1px solid black;
animation: mymove 5s infinite;
-webkit-animation: mymove 5s infinite; /* Chrome, Safari, Opera */
}
/* Chrome, Safari, Opera */
@-webkit-keyframes mymove {
50% {margin-left: 50px;}
}
/* Standard syntax */
@keyframes mymove {
50% {margin-left: 50px;}
}
</style>
</head>
<body>
<p>Gradually change the margin-left, from 0px to 50px and back to 0px:<p>
<div id="myDIV">
This is my DIV element.
</div>
<p>The margin-left property is <em>animatable</em> in CSS.</p>
<p><b>Note:</b> CSS Animations do not work in Internet Explorer 9 and earlier versions.</p>
</body>
</html>