JSFiddle - React, Tailwind, and code Playground

HTML

<div id="keith">
    <div class="keith-wrapper"></div>
</div>

CSS

#keith, .keith-wrapper {
    height: 200px;
    width: 200px;
}

#keith {
    border: 3px solid black;
    overflow: hidden;
    position: relative;
}

.keith-wrapper {
    background-image: url('http://oi43.tinypic.com/v5hlk2.jpg');
    left: 0;
    position: absolute;
    top: 205px;
}

JavaScript

$(function() {
    var doAnimation = function() {
        $(".keith-wrapper").animate({"top": "-250px"}, 5000, function() {
            $(".keith-wrapper").css({"top": "205px"});
            setTimeout(function() { doAnimation(); }, 500);
        });
        
    };
    
    doAnimation();
});