14
我有两个div浮动:左。我z-index第一个div在上面,但它不起作用。这是因为浮动元素没有定位?z-indexing浮动divs
<html>
<style>
#wrap{
background:#666;
}
#menu, #thumbs{
float:left;
}
#menu{
background:#06C;
z-index:10;
}
#thumbs{
background:#0CF;
margin-left:-20px;
}
</style>
</head>
<body>
<div id="wrap">
<div id="menu">
<p>menu</p>
</div>
<div id="thumbs">
<p>thumbs</p>
</div>
</div>
</body>
</html>
你们太棒了!感谢堆垛机!这解决了这个问题。 – Preston 2011-02-16 16:03:35