gpt4 book ai didi

html - 定位元素 : Div on top of another div

转载 作者:太空宇宙 更新时间:2023-11-04 15:25:02 24 4
gpt4 key购买 nike

实时页面:Link

我有一个顶部导航栏,它有一个 fixed 位置和 oblique 颜色。当您向下滚动时,此导航栏应位于所有帖子的顶部。但是,当您通过上面的链接查看实时页面时,图片会放在顶部导航栏的顶部,而不是相反。

另一方面,这个 view正在按我希望的方式工作。

谁能告诉我如何解决这个问题?

最佳答案

z-index:1 添加到 .nav

.nav {
background-color: black;
padding-bottom: 2px;
z-index: 1;
}

关于html - 定位元素 : Div on top of another div,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14152993/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com