JSFiddle - React, Tailwind, and code Playground
HTML
<html>
<body>
<div id="container"></div>
</body>
</html>
JavaScript
var url = "https://cdn.pixabay.com/photo/2015/12/01/20/28/road-1072823_1280.jpg";
$(document).ready(function() {
$("#container").css({
"background-image": `url(${url})`,
"width": 640,
"height": 374
});
})