html - 如何让我的导航保持在顶部?

标签 html css navigation sticky

我一直在尝试一些关于如何让我的导航栏在滚动时保持在顶部但无法正常工作的不同教程:/

这是我遇到问题的页面: http://www.vernietig.be/vcs/index.html

在此先感谢您帮助我解决这个问题!

最佳答案

试试这个:

#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

关于html - 如何让我的导航保持在顶部?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24947170/

相关文章:

swift - 隐藏带有表格 View 的导航栏

html - 负 px 或大数 px - 哪个更好

javascript - 如何在 IE HTML 条件中生成 "else"?

css - 不能将垂直菜单列表移到最左边,它在水平菜单列表下面

css - 在第一个 child li 中选择类(class)

javascript - 如何根据内容动态调整 div 宽度,同时保持其居中并让内容向左浮动?

html - Z-index 在子导航中不起作用

html - 如何在 cfscript 内将输出输出到网页?

html - CSS 或 HTML 中的形状

android - 喷气背包导航 : how to navigate from child of one nested graph to child from another nested graph?