Home > Article > Web Front-end > Newbie asking for advice: Regarding the problem of positioning and z-index not working, please help me, wait online_html/css_WEB-ITnose
代码如下:
定位是跟父集相对的 你现在下面的那个div在外面 并不在上一个div里面
so 就会出现这种情况咯
你这样写
You can take a closer look at the knowledge of relative positioning and absolute positioning
You use position:relative for the latter div, which does not disrupt the document flow.
The div before it uses position:absolute, which destroys the document flow.
The two divs are not on the same level.
Just a quick question. Isn’t z-index a stacking order?
You use position:relative for the latter div. This method does not destroy the document flow.
The div before it uses position:absolute, which destroys the document flow.
The two divs are not on the same level.