JSFiddle - React, Tailwind, and code Playground
by petroveg
HTML
<div id="one">
<div id="two">
<div id="three"></div>
</div>
</div>
CSS
#one, #two, #three{
position:absolute;
}
#one{
width:400px;
height:70px;
background:#396;
}
#two{
width:200px;
height:140px;
background:#36c;
z-index:-1;
}
#three{
top:20px;
width:300px;
height:100px;
background:#f60;
}
JavaScript
$(function () {
var elems = $('div');
elems.each(function (index, elem) {
var $this = $(elem);
console.log($this.attr('id'), $this.css('z-index'));
});
});