我爲我的網頁使用bootstap菜單,但是當我點擊第二個菜單時,他會覆蓋DIV的標題,就像在此圖像中一樣。 當我滾動時,Div的Bootstrap菜單封面標題
HTML代碼:
<nav class="navbar navbar-default navbar-fixed-top top-nav-collapse navbar-out-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">
<img src="https://placehold.it/153X50">
</a>
</div>
<div class="navbar-collapse collapse" aria-expanded="false" style="height: 0px;">
<ul class="nav navbar-nav navbar-right">
<li class="scroll"><a href="#home">Home</a></li>
<li class="scroll active"><a href="#services">Menu 1</a></li>
<li class="scroll"><a href="#doctors">Menu 2</a></li>
<li class="scroll"><a href="#about-us">Menu 3</a></li>
<li class="scroll"><a href="#gallery">Gallery</a></li>
<li class="scroll"><a href="#contact">Contact</a></li>
</ul>
</div>
</div>
</nav>
CSS代碼:
@media(min-width:767px) {
.navbar {
padding: 20px 0;
-webkit-transition: background .5s ease-in-out,padding .5s ease-in-out;
-moz-transition: background .5s ease-in-out,padding .5s ease-in-out;
transition: background .5s ease-in-out,padding .5s ease-in-out;
}
}
我可以解決此問題與jQuery?
請給予充分的代碼 –