JSFiddle - React, Tailwind, and code Playground
HTML
<div class="fw">
<div class="bg_slide_hz"></div>
</div>
CSS
.bg_slide_hz{
position: absolute;
width:400px;
height:200px;
background-image: url('http://lorempixel.com/400/200/sports/');
}
.fw{
width:300px;
height:200px;
overflow:hidden;
position:relative;
border:1px solid #f00;
}
JavaScript
$( document ).ready(function() {
$( ".bg_slide_hz" ).animate({ "left": "-=100px" }, 5000 );
});