How to put a static div on top of an absolute position div?

前端 未结 6 1805
误落风尘
误落风尘 2020-12-29 18:49

I am building a small web application. I have two divs. One is absolute and the other is static. I am trying to position my static div on top of my absolute one, so that it

6条回答
  •  隐瞒了意图╮
    2020-12-29 19:42

    Rather than placing the statically positioned element over the absolutely positioned element, you can place the absolutely positioned element behind the statically positioned element. You can do this by setting the z-index of the absolutely positioned element to a negative value. However, as @Town mentioned, this will also place the absolutely positioned element behind everything else in the normal flow.

提交回复
热议问题