JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<div class="absolute-background" />
<div class="where-is-this" />
</div>
CSS
html, body {
height: 100%;
margin: 0;
}
* {
box-sizing: border-box;
}
.container {
background: transparent;
position: relative;
overflow: hidden;
height: 100%;
width: 100%;
}
.absolute-background {
position: absolute;
height: 100%;
width: 100%;
left: 0;
top: 0;
background: blue;
z-index: 0;
}
.where-is-this {
height: 100px;
width: 100%;
z-index: 1000000;
background: red;
}