CSS 粘性导航栏问题

发布于 2025-01-17 01:44:20 字数 218 浏览 2 评论 0原文

导航栏在第二部分消失。尝试了一切但不起作用。顺便说一句,我不喜欢编码。只需遵守主题要求这里是获得更好效果的文件看

尝试了我所理解的在我的水平上的一切。这让我发疯。

navbar disappears in second section. tried everything but does not work. I am not into coding btw. just complying to a subject requirement here is the file to get a better look

tried everything I understand at my level. it is driving me crazy.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不念旧人 2025-01-24 01:44:20

在您的 style.css 中进行以下更改:

.navbar {
     z-index: 10;
}

#about{
     z-index: 5;
}

这意味着什么?

导航栏中的 z-index 值比 about 部分更多z-index 值越大,优先级越高,并且将位于顶部。

https://www.w3schools.com/css/css_z-index.asp

In your style.css make these changes:

.navbar {
     z-index: 10;
}

#about{
     z-index: 5;
}

What does that mean?

The value of z-index is more in navbar than in about section. More z-index value will give it more priority and it will be positioned on the top.

Read more about z-index at https://www.w3schools.com/css/css_z-index.asp

尘曦 2025-01-24 01:44:20

第一个 - 您应该处理图像或礼物或视频大小并转换为网页类型,因为
您的网站非常大并且加载延迟,

第二个 - 添加这个可能会解决您的问题

.navbar {
   z-index: 9999
}

the first - you should handle images or gift or video size and convert to for web types because
your web site very big size and delay for loading ,

the second - Adding this might solve your problem

.navbar {
   z-index: 9999
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文