8
解釋這種行爲:爲什麼z-index:-1;出現在z-index上方:1;?
<div style="z-index: 1"></div>
<div></div>
<div></div>
<div></div>
div {
position: relative;
background: red;
width: 100px;
height: 100px;
}
div:before {
position: absolute;
background: blue;
width: 100px;
height: 100px;
z-index: -1;
content: "";
left: -5px;
top: -5px;
}
唯一的區別是第一個div擁有的z-index:1套。
不錯':)'..... – 2012-07-29 19:11:19