JSFiddle - React, Tailwind, and code Playground
by ajthomascouk
HTML
<img class="blue" src="http://via.placeholder.com/200/0037ff">
<img class="red" src="http://via.placeholder.com/200/ff0010">
CSS
.red {
-webkit-animation-name: red;
-webkit-animation-duration: 2s;
-webkit-animation-iteration-count: infinite;
animation-name: red;
animation-duration: 2s;
animation-iteration-count: infinite;
}
.blue {
transform: translate(30%);
z-index:1;
}
@keyframes red {
from {
transform: translate(50%);
}
to {
transform: translate(0);
}
}