我想在页面中添加3个div。但在此之前,我想在页面上找到z-index的最高值,然后将+1添加到此值,并将此新值添加到这3个div的css中。我怎么能在jQuery中做到这一点?
例如
<div id="one">
<div id="two"></div>
<div id="three"></div>
</div>
和css
#one {width:200px; z-index: +1 to the highest value found ;}
#two {width:100px; z-index: +1 to the highest value found ;}
#three {width:50px; z-index: +1 to the highest value found ;}