can I override z-index inheritance from parent element?

后端 未结 1 946
眼角桃花
眼角桃花 2020-12-05 17:16

Is there any way to override z-index inheritance from parent elements when using absolute position. I want 2222 div to be on top of 0000 div:

相关标签:
1条回答
  • 2020-12-05 18:23

    I believe z-index is relative to the nearest positioned element. So, if you had two divs inside the "1111" div, they could be z-index'd relative to each other, but since 2222 is a child of 1111, it cannot be z-indexed relative to 0000, and will always be above 1111.

    0 讨论(0)
提交回复
热议问题