您好我一直在尝试为我的网站开发课程中的某个项目制作一些动画。我试图通过让街道和一些山脉在无尽的环路上水平移动来创造汽车在街道上移动的错觉,但我还需要重复照片。我发现如何使用{background-position}进行此操作,但是如果没有任何建议,我无法将照片无缝滚动?
body {
background-color: rgb(59, 193, 236);
}
#Mountains {
transform: translate(-8px, -400px);
animation: slide 2s linear infinite;
}
@keyframes slide {
from {
transform: translate(-8px, -400px);
}
to {
transform: translate(1109px, -400px);
}
}
<div id="Mountains">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1109" height="1500" viewBox="0 0 2100 1500">
<metadata><?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.6-c138 79.159824, 2016/09/14-01:09:01 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?></metadata>
<image y="316" width="2100" height="1184" xlink:href="data:img/png;base64,iVBORw0KGgoAAAANSUhEUgAACDQAAASgCAMAAAA63XraAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAC+lBMVEVirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAdirAcAAABEFMKVAAAA/HRSTlMADh4tPExba3iIkpmaqrO7x8zZ3d/u3MGjh04sBjJlja7Q8vvYrIRZMQk3apvN+vzbsV4qAhWg0/G9hlAaNX7K/eOtczoWV6Hq9sIUU5PU/tZdIA05Z5XS4ikKTYGvcAER9eefG30DEmzI8CVK+N53D4vlHDN2+e20PxNfos5xIvS5DKelBAdSvumPliN/z2nGuEkfguGOVrUFfOyMKG3odNXvGD4mJDYQwEtiVZdaC9pj82TJRi/DQDvFt2ayLpgnHZ0hclHXaJGknL8IK6bmREdP5KuwhXr3VNGUkIBF4Hm86zTESD1vy1w4WKkZujCJQoNBe0NgYah1bhdApf/0AAAAAWJLR0T9SwmT6QAAAAlwSFlzAAAuIwAALiMBeKU/dgAAAAd0SU1FB+EGDREfEdboqNEAACQtSURBVHja7d39/95z/f9xzNnMzMzJnFSr5WQWG72d5aS3kJPSEn0Itc3JnISJIYkxmUjlLCxWOc05HyJ9UE6HIj7F11mnovL16ZOU6lt++KJyUW1zf2/v43gcJ9frX/A+ns/njtdtx/P1er4WWIBqCy40YOFFFl1s8YFLDFpy8OClhrxi6aGvWmbY3yy73N8sv8LwFRdbae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5b63vEwYaTcAAAAASUVORK5CYII="/>
</svg>
</div>
答案 0 :(得分:0)
我还没有只有一个SVG的解决方案。但是如果你可以在容器中包装两个图像(不一定相同),则可以使用第二个图像的animation-delay属性轻松制作重复动画。
参见示例: https://jsfiddle.net/kxo7g714/
.mountains {
position: absolute;
top: 0;
left: 0;
transform: translate(-150px, 50px);
animation: slide 4s linear infinite;
}
.mountains.two {
animation-delay: -2s;
}
答案 1 :(得分:0)
如果您只能使用一张图片,请复制图片内部的内容。该示例使用不同的颜色来说明路径的基本相同。
https://jsfiddle.net/crvpenfo/2/
@keyframes slide {
from {
transform: translate(0, 50px);
}
to {
transform: translate( "NegativeHalfWidth" , 50px);
}
}