1
我有DIV是位置固定和位置固定的div内的另一个DIV是位置相对z索引不位置固定元件内工作
<div class="wrap">
<div class="content">
</div>
</div>
CSS是:
.wrap{
position: fixed;
width:80%;
height:200px;
background-color:#a157df;
z-index:5;
}
.content{
position: relative;
width:30%;
height:100px;
background-color:#a1a7af;
left:80%;
z-index:1;
}
示例是在这link:
如何将第二个div放在第一个里面,我用z-index但它不工作
我没有看到z-index与此有什么关系。你想达到什么目的? – 2014-09-26 17:14:49
你的意思是像http://jsfiddle.net/j08691/6xk9v6s8/? – j08691 2014-09-26 17:16:12
是的,我想要什么,它没有打我,谢谢 – Yaswanth 2014-09-26 17:24:41