代码示例:(标识:cssref_anim_background)
<!DOCTYPE html>
<html>
<head>
<style> 
#myDIV {
  width: 300px;
  height: 200px;
  background: red url('/static/demo/images/smiley.gif') no-repeat top left/5px 5px;
  animation: mymove 5s infinite;
}

@keyframes mymove {
  50% {background: blue bottom right/50px 50px;}
}
</style>
</head>
<body>

<h1>background 的动画效果:</h1>

<p>逐渐更改背景属性:<p>
<div id="myDIV"></div>

<p>background属性是所有背景属性的简写属性。</p>
<p>在 CSS 总,background-color、background-position 以及 background-size 属性<em>支持动画制作</em>。</p>
<p><b>注释:</b>CSS 动画在 Internet Explorer 9 以及更早版本中不起作用。</p>

</body>
</html>
运行结果: