JSFiddle - React, Tailwind, and code Playground
HTML
<div class="Amarillo">
<div class="RojoTransparente">
<p>Texto. Este no debe de estar transparente</p>
</div>
</div>
CSS
div.Amarillo {
height: 150px; width: 400px;
background-color: rgb(255, 255, 0);
}
div.RojoTransparente {
height: 50px; position: relative; left: 50px;
background-color: rgba(255, 0, 0, 0.2);}
p {background-color: #F00; color: #FFF;}