📜  在伪类之后设置 z 索引 - 无论代码示例

📅  最后修改于: 2022-03-11 14:58:51.148000             🧑  作者: Mango

代码示例1
#parent {
    position: relative;
    z-index: 1;
}
#pseudo-parent {
    position: absolute;
    /* no z-index allowed */
}
#pseudo-parent:after {
    position: absolute;
    top:0;
    z-index: -1;
}