所以这些天我放弃了 CSS3 动画,所以我现在正在玩它。但不幸的是,我在将 bg 图像定位到底部时遇到了问题。
这是我正在处理的代码:
body {
margin: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 20px;
color: #333333;
background: #A9D0F5 url("../image/bg-clouds.png") repeat-x fixed center bottom;
animation: animatedBackground 40s linear infinite;
-ms-animation: animatedBackground 40s linear infinite;
-moz-animation: animatedBackground 40s linear infinite;
-webkit-animation: animatedBackground 40s linear infinite;
/*background-color: #008bcf;*/
}
@-keyframes animatedBackground {
from { background-position: 0 0; }
to { background-position: 100% 0; }
}
@-webkit-keyframes animatedBackground {
from { background-position: 0 0; }
to { background-position: 100% 0; }
}
@-ms-keyframes animatedBackground {
from { background-position: 0 0; }
to { background-position: 100% 0; }
}
@-moz-keyframes animatedBackground {
from { background-position: 0 0; }
to { background-position: 100% 0; }
}
这里似乎有什么问题?有任何想法吗?谢谢。
这是 jsfiddle:http: //jsfiddle.net/Rex2E/