0
我是begginer with bootstrap。我试图在我的页面上创建ScrollSpy Bootstrap,但它不起作用。无论我做什么都不能正常工作,我不知道为什么?有人可以看我的代码,并告诉什么是错的。那就是:bootstrap scrollspy does not t
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/style.css">
<style>
#top-center-photo{
width: 100%;
height: 500px;
background-color: red;
}
#aboutus-content{
width: 100%;
height: 500px;
background-color: green;
}
#offert{
width: 100%;
height: 500px;
background-color: yellow;
}
</style>
</head>
<body data-spy="scroll" data-target=".navbar">
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="#top-center-photo">o nas</a></li>
<li><a href="#aboutus-content">oferta</a></li>
<li><a href="#offert">realizacje</a></li>
</ul>
</div>
</nav>
<div id="top-center-photo">
</div>
<div id="aboutus-content">
</div>
<div id="offert">
</div>
<div id="realizacje">
</div>
你能说清楚吗? – Gopalakrishnan
嗨dendi,我在浏览器中检查了你的代码,它的工作正常..你想要什么.. –