How do I handle parent, child, sibling z-index relationship. How does this work ?

Here is link to codepen: https://codepen.io/H4ds0n/pen/poKWQga?editors=1111 I was wondering if this is even possible. What I want to achive here is put child over outer and parent under outer block. So the order of the colors from bottom would be parent, outer, child (blue, red, yellow)
H4ds0n
CodePen
poKWQga
...
4 Replies
MarkBoots
MarkBoots3y ago
little trickery with perspective and translatez
MarkBoots
MarkBoots3y ago
--edit-- you don't even need the perspective. preserve-3d is enough
interpod
interpodOP3y ago
Will this work if outer is sibling with absolute positioning and z-index 1?
MarkBoots
MarkBoots3y ago
i can't see a problem with it. should work... i think
Want results from more Discord servers?
Add your server