gpt4 book ai didi

html - 当我滚动时,我的主 Logo 横幅出现在我的导航栏中

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

我已经为我的导航栏指定了固定位置和 1 的 z-index。当我滚动时它保持在顶部,这很好,但是当它向上滚动时我的 Logo 不会在它后面,它仍然可以在我真的不想要的导航区域中看到。下面是我的 Logo 的 css。我还在学习网页设计。谢谢。

#logo {
background-color: #292421;
color: white;
margin-top: 70px;
padding: 40px 0 25px;
}
#nav_bar {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 1;
background: url(..images/header-fade.gif) repeat-x;
border-bottom: 1px solid #ccc;
}

最佳答案

您的#nav_bar 没有背景。您提供的网址不正确。你可能希望它是

background: url(../images/header-fade.gif) repeat-x;

请注意,您在点 .. 之后错过了斜杠字符 /

关于html - 当我滚动时,我的主 Logo 横幅出现在我的导航栏中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19859912/

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