JSFiddle - React, Tailwind, and code Playground
HTML
<div class="transparent_background">
<div id="window">hello.</div>
</div>
CSS
.transparent_background {
position:fixed;
top:0px; left:0px;
width:100%;
min-height: 100%;
background-color: rgb(0, 0, 0);
background-color: rgba(0, 0, 0, 0.3);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";
z-index:990;
}
#window {
border:2px dotted red;
background:white;
position: absolute;
top:0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}