div
{
position:absolute
left:0px
top:0px
z-index:-1
}
定义和用法
z-index 属性设置元素的堆叠顺序。拥有更高堆叠顺序的元素总是会处于堆叠顺序较低的元素的前面。
注释:元素可拥有负的 z-index 属性值。
注释:Z-index 仅能在定位元素上奏效(例如 position:absolute)!
转载自http://www.w3school.com.cn/cssref/pr_pos_z-index.asp
用定位,例:<div class="top"></div>
<div class="bottom"></div>
css:
.top{width:300pxheight:100pxbackground:#000}
.bottom{width:300pxheight:100pxbackground:#090position:relativeleft:50pxtop:-50px}
你把代码粘到相对应的文件中看看效果就知道了