最佳答案
原始代码来自David Walsh - CSS Background Animations
@keyframes animatedBackground {
from {
background-position: 0 0;
}
to {
background-position: 100% 0;
}
}
#animate-area {
width: 560px;
height: 400px;
background-image: url(https://davidwalsh.name/demo/bg-clouds.png);
background-position: 0px 0px;
background-repeat: repeat-x;
animation: animatedBackground 40s linear infinite;
}
<div id="animate-area"></div>
关于javascript - HTML5 无尽的背景动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40190755/