<!DOCTYPE html>
<html>
<head>
<style>#myDIV {
width: 300px;
height: 200px;
border: 1px solid black;
background-image: url('smiley.gif');
background-position: top left;
-webkit-animation: mymove 5s infinite; /* Chrome, Safari, Opera */
animation: mymove 5s infinite;
}
/* Chrome, Safari, Opera */
@-webkit-keyframes mymove {
50% {background-position: center;}
}
/* Standard syntax */
@keyframes mymove {
50% {background-position: center;}
}
</style>
</head>
<body>
<p>Gradually change the background-position from "top left" to "center", and back to "top left":<p>
<div id="myDIV"></div>
<p>The background-position 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>