JSFiddle - React, Tailwind, and code Playground
HTML
<div class="d1">
<div class="sq">100500</div>
k
</div>
<div class="d1">dfghfgh
<div class="sq">100500</div>
</div>
CSS
.sq {
width: 100px;
background: yellow;
position: relative;
/*z-index: 0;*/
}
.sq:after {
content:"";
position: absolute;
width: 90%;
height: 10px;
bottom: 4px;
left: 8px;
z-index: -1;
transform: rotate(4deg);
box-shadow: 0 5px 5px 0 gray;
}
.d1 {
background: green;
/*z-index: -2;*/
opacity: .99;
}