JSFiddle - React, Tailwind, and code Playground

by techiedelight

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})`)
    .css("width", 640)
    .css("height", 374);
})