Using z-index to get div above another div

前端 未结 4 1829
囚心锁ツ
囚心锁ツ 2020-11-28 16:00

I want the div1 to be above div2. I try with z-index but it does not work.

I\'ve tried this code:

4条回答
  •  孤城傲影
    2020-11-28 16:24

    The default property for div is position:static, Add position:relative in both the div then only z-index will work.

提交回复
热议问题