HTML:
<div id="cloud">image</div>
CSS:
#cloud{
width:180px;
padding-left:30px;
opacity:0.7;
animation:slide 10s infinite;
-moz-animation:slide 10s infinite;//Firefox
-webkit-animation:slide 10s infinite;//chrome and safari
-o-animation: slide 10s infinite;//Opera
}
@keyframes slide{
0% {-transform: translate(0px, 0px); }
100% {-transform: translate(500px,0px); }
}
@-moz-keyframes spin{
0% {-moz-transform: translate(0px, 0px); }
100% {-moz-transform: translate(500px, 0px); }
}
@-webkit-keyframes slide{
0% {-webkit-transform: translate(0px, 0px); }
100% { -webkit-transform: translate(500px,0px); }
}
@-o-keyframes slide{
0% {-o-transform: translate(0px, 0px); }
100% {-o-transform: translate(500px, 0px); }
}
这是小提琴:
http://jsfiddle.net/qCahH
用图片替换文字。