JSFiddle - React, Tailwind, and code Playground
HTML
<div class="block"></div>
CSS
.block {
width: 200px;
height: 100px;
background: url('https://habrastorage.org/files/430/88a/4b2/43088a4b2c6d48e190bb14e08221dc43.png') 50px 0 / cover repeat;
transition: background 5s ease;
}
.block:hover {
animation: movement 2s infinite linear;
}
@keyframes movement {
from {
background-position: 50px 0;
}
to {
background-position: 100% 0;
}
}