この現象を説明する:1セット:なぜ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屈折率を有しています。
ニース ':)' ..... –