I am trying to apply a z-index on a child inside a element with rotateX. If I remove rotateX it works fine, but I can't actually remove it.
.message {
position: relative;
padding-bottom: 40px;
}
.back {
position: absolute;
background: white;
transform: rotateX(0deg);
}
.emoji {
position: absolute;
z-index: 9999;
background: red;
}
<div class="message">
<div class="back">
bla
<div class="emoji">
fjoiefj<br />
oiejfoisjj
</div>
</div>
</div>
<div class="message">
<div class="back">
bla
</div>
</div>
<div class="message">
<div class="back">
bla
</div>
</div>
Live version here: https://jsbin.com/qirowoteti/1/edit?html,css,output
Do I know a way to make z-index work without removing rotateX?