<html>
<head>
<style>
#myDIV {
width: 300px;
height: 200px;
background: red url('smiley.gif') no-repeat top left/5px 5px;
animation: mymove 5s infinite; /* Safari 4.0 - 8.0 */
animation: mymove 5s infinite;
}
/* Safari 4.0 - 8.0 */
@-webkit-keyframes mymove {
50% {background: blue bottom right/50px 50px;}
}
@keyframes mymove {
50% {background: blue bottom right/50px 50px;}
}
</style>
</head>
<body>
<h1>Animation of background</h1>
<p>Gradually change the background property:<p>
<div id="myDIV"></div>
<p>The background property is a shorthand property for all background properties.</p>
<p>The background-color, background-position, and background-size properties are <em>animatable</em> in CSS.</p>
<p><b>Note:</b> CSS Animations do not work in Internet Explorer 9 and earlier versions.</p>
</body>
<!-- Mirrored from www.w3schools.com/cssref/tryit.asp?filename=trycss_anim_background by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 13:18:17 GMT -->
</html>