【发布时间】:2020-12-21 21:17:13
【问题描述】:
我目前正在开发一个网站。 我的导航栏只在 index.html 页面上工作。当我在网络浏览器中打开 aboutme.html 时,我无法点击导航栏上的任何按钮。我复制了标准的 Bootstrap 导航栏并将其设置到中间。
style.css(在 css/style.css 中):
/* Style Navbar */
.navbar-brand {
/* logo */
margin-left: 20vw;
}
/* .active {
font-weight: 600;
text-decoration: underline;
} */
.dropdown {
position: absolute;
right: 20vw;
}
我没有使用特殊的js文件
【问题讨论】:
-
您的 blog.html 文件位于
sites文件夹中,因此请将<script src="js/jquery-3.5.1.js"></script>更改为<script src="../js/jquery-3.5.1.js"></script>
标签: javascript html css twitter-bootstrap navbar