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