新手to z-index。我想將backleftBox和backrightBox放在frontBox後面,但我的代碼看起來不起作用。css z-index問題
<style type="text/css">
#frontBox{ width: 400px; height: 500px; margin: 0 auto; background-color: #ccc; position: relative; z-index: 99;}
#backleftBox{ width: 90px; height: 90px; background-color: green; position: absolute; left: -25px; z-index: 12;}
#backrightBox { width: 90px; height: 90px; background-color: blue; position: absolute; left: -15px; z-index: 11;}
</style>
<div id="frontBox">
<div id="backleftBox"></div>
<div id="backrightBox"></div>
</div>
duplicate http://stackoverflow.com/questions/3376309/z-index-not-overlaying-over-divs-further-down-in-thedom – kjy112 2011-02-17 02:57:49