JSFiddle - React, Tailwind, and code Playground
HTML
<div class="waterfall"></div>
CSS
.waterfall {
width: 204px;
height: 237px;
background-image: url("https://twxde.innogamescdn.com/img/village/animations/waterfall.day_c2027240da.png");
position: relative;
border: solid 1px black;
overflow:show;
-webkit-animation: playv 6s steps(4) infinite, playh 1.5s steps(6) infinite;
-moz-animation: playv 6s steps(4) infinite, playh 1.5s steps(6) infinite;
animation: playv 6s steps(4) infinite, playh 1.5s steps(6) infinite;
}
@-webkit-keyframes playv {
0% {
background-position-y: 0px;
}
100% {
background-position-y: -952px;
}
}
@-webkit-keyframes playh {
0% {
background-position-x: 0px;
}
100% {
background-position-x: -1236px;
}
}
@-moz-keyframes playv {
0% {
background-position-y: 0px;
}
100% {
background-position-y: -952px;
}
}
@-moz-keyframes playh {
0% {
background-position-x: 0px;
}
100% {
background-position-x: -1236px;
}
}
@keyframes playv {
0% {
background-position: 0 0;
}
100% {
background-position: 0 -952px;
}
}
@keyframes playh {
0% {
background-position: 0 0;
}
100% {
background-position: -1236px 0;
}
}