JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
A lot of content here ...
</div>
CSS
.container {
border: 1px solid;
}
JavaScript
$("<div>Loading...</div>").css({
position: "absolute",
width: "100%",
height: "100%",
top: 0,
left: 0,
background: "#ccc"
}).appendTo($(".container").css("position", "relative"));