【发布时间】:2011-02-17 11:08:01
【问题描述】:
z-index 的新手。我想把 backleftBox 和 backrightBox 放在 frontBox 后面,但我的代码似乎不起作用。
<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>
【问题讨论】:
标签: css