Hide scrollable content behind transparent fixed position divs when scrolling the page?

后端 未结 10 1078
隐瞒了意图╮
隐瞒了意图╮ 2020-12-01 09:16

I have a div called header that is set up with a fixed position. The problem is when I scroll the page the content of the page shows up behind the header (the header is tran

10条回答
  •  被撕碎了的回忆
    2020-12-01 10:09

    You are probably looking for z-index. It allows you to specify the vertical order of elements on the page, so an element with z-index: 10 is floating above (visually) an element with z-index: 5.

    Give the content z-index: 5 and see if it works.

提交回复
热议问题