JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<head>
</head>
<body>
<div class="background" id="background"></div>
<div class="page-content">Put your content here</div>
</body>
</html>
CSS
.background {
background-color:whitesmoke;
position:absolute;
width:999em;
height:999em;
z-index:1;
}
.page-content {
z-index:2;
position:relative;
}
JavaScript
$(document).ready(function(){
var windowHeight = $(window).height();
var windowWidth = $(window).width();
var animateWidth = '500'
$('#background').height(windowHeight).width(windowWidth)
.animate({
left: animateWidth + 'px',
width: (windowWidth - animateWidth) + 'px'
}, 2000);
});