JSFiddle - React, Tailwind, and code Playground
by Csaba Hellinger
HTML
<div class="container">
<div class="bg"></div>
<div class="fg"></div>
</div>
CSS
body {
background: #222;
}
.container {
position: relative;
width: 208.906px;
height: 100px;
margin-left: 0.5px;
}
.bg {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: red;
}
.fg {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background: black;
/*Â comment-uncomment this: */
background: linear-gradient(to bottom, gray 0%, black 100%);
}