I have a rainbow bar that sits at the top of my page:
.rainbow-bar { /* Epic rainbow bar */
height:8px;
background: black; /* fallback */
background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
background-size: 200% 200%;
animation: moveright 3s ease infinite;
animation-direction: alternate;
}
So I want the bar to loop forever, moving to the right. I'm bad at explaining so heres an image
This is the current animation code I have which of course just makes it move offscreen then come back, which is exactly what I do not want. If anyone could point me in the right direction I would really appreciate it, thanks.
@keyframes moveright {
0%{background-position:0% 50%}
50%{background-position:100% 50%}
100%{background-position:0% 50%}
}