JSFiddle - React, Tailwind, and code Playground
by Brett Miley
HTML
<div id="container">
<img src="http://d3ckw5pamzrtgd.cloudfront.net/assets/animations/care/animation.png" alt="My super animation"/>
</div>
CSS
#container{
width:100%;
height: 350px;
display:block;
overflow:hidden;
}
JavaScript
var imgHeight = 360;
var numImgs = 67;
var cont = 0;
var animation = setInterval(function(){
var position = -1 * (cont*imgHeight);
$('#container').find('img').css('margin-top', position);
cont++;
if(cont == numImgs){
clearInterval(animation);
}
},100);