I need to create an animation of an image that loops infinitely, like a super mario background, where the end of the image is attached to the beggining of the same image, giving the perception that the image never ends, but using css keyframes.
So far I've come to this, but this only makes the image move back and forth.
How can I achieve that?
.waves {
height: 320px;
width: 700px;
position: relative;
top: -325px;
background-repeat: repeat-x;
animation: animatedImage 5s linear infinite;
}
@keyframes animatedImage {
0% { left: 0;}
50%{ left : 500px;}
100%{ left: 0;}
}