JSFiddle - React, Tailwind, and code Playground
HTML
<div id="html">
<div id="inner">Simulated page content</div>
</div>
CSS
#html{
background: url(http://placeimg.com/500/500/animals);background-size: cover;
/* TRANSITION */
-webkit-transition: background-image 3s;
-moz-transition: background-image 3s;
-o-transition: background-image 3s;
transition: background-image 3s;
}
#inner{width:100%;height:100vh;background:transparent;}
JavaScript
setTimeout(function(){
$('#html').css('background-image','url(http://placeimg.com/500/500/nature)');
},2000);