我的问题是在滚动时没有类添加到我的导航栏项目中,所以我也无法更改导航栏样式。 这是我渲染的html文件:
正文标签和导航栏:
<body data-spy="scroll" data-target=".contentsbar">
...
<div id="fs-navbar" class="contentsbar">
<ol id="fs-nav-items">
<li class="fs-nav-item">
<a href="#introduction">
Introduction
链接元素:
<h1 id="introduction">Introduction</h1>
页脚:
<script src='/js/jquery.js' type='text/javascript'></script>
<script src='/js/jquery-ui.js' type='text/javascript'></script>
<script src='/js/methods.js' type='text/javascript'></script>
<script src='/js/localization.js' type='text/javascript'></script>
<script src='/js/content.js' type='text/javascript'></script>
<script src='/js/sticky.js' type='text/javascript'></script>
<script src='/js/svgmap.js' type='text/javascript'></script>
<script src='/js/zoom.js' type='text/javascript'></script>
<script src='/js/scroll.js' type='text/javascript'></script>
<script src='/js/globals.js' type='text/javascript'></script>
<script src='/js/mt.js' type='text/javascript'></script>
<script src='/js/hardware.js' type='text/javascript'></script>
<script src='/js/main.js' type='text/javascript'></script>
<script src='/js/carousel.js' type='text/javascript'></script>
<script src='/js/bootstrap.min.js' type='text/javascript'></script>
bootstrap.min.js加载。