JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://www.marioplanet.com/js/jquery.spritely-0.2.1.js"></script>
<div id="bg_1"></div>
<div id="bg_2"></div>
CSS
#bg_1
{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 432px;
background: transparent url(http://www.marioplanet.com/images/spritely_background/SMW_YI_1.gif) repeat-x;
z-index: -1;
}
#bg_2
{
position: absolute;
top: 432;
width: 100%;
height: 432px;
background: transparent url(http://www.marioplanet.com/images/spritely_background/SMW_YI_2.gif) repeat-x;
z-index: -1;
}
JavaScript
$(document).ready(function(){
$('#bg_1').pan({fps: 30, speed: 2, dir: 'right'});
$('#bg_2').pan({fps: 15, speed: 2, dir: 'left'})
});