我使用導航欄進行了操作,並將其放置在標題圖片下方。一切都看起來很好,全屏。但是在移動設備上,導航欄右側的項目隱藏在切換中。誰能告訴我爲什麼?Bootstrap切換按鈕不顯示所有導航右側項目
Bootply:http://www.bootply.com/zmpMWqSmyU
HTML:
<!-- header pic -->
<div class ="row">
<img src ="1.jpg" class ="img-responsive">
</div>
</div>
<!-- Navigation -->
<div class = "navbar navbar-transaparent navbar-fixed-top" role
="navigation">
<div class ="container">
<div class = "navbar-header">
<button type="button" class="navbar-toggle"
data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div> <!-- end of navbar header -->
<div class="collapse navbar-collapse navbar-left" id="myNavbar">
<ul class="nav navbar-nav"> </li>
<li><a href="#">Home</a></li>
<li><a href="#1">About us </a></li>
<li><a href="#">Products</a></li>
</ul>
</div>
<a class = "navbar-brand" href="#"> <h1 style="font
size:80px;">Lily </h1></a>
<div class="collapse navbar-collapse navbar-right" id="myNavbar">
<ul class="nav navbar-nav">
<li><a href="#">Blog</a></li>
<li><a href="#">Testimonials </a></li>
<li><a href="#">Contact us</a></li>
</ul>
</div>
</div> <!-- end of container -->
</div> <!-- end of navbar -->
css
.nav {
font-size: 35px;
color: black;
margin-top: 520px;
}
.navbar-toggle .icon-bar {
display: block;
background-color: blue;
}
.navbar-brand {
color: #ff5bae;
text-align: center;
position: absolute;
margin-top: 6.0%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%) }
}
.navbar-brand:hover{
color:#bcaacf;
}
#myNavbar li>a:hover{
color: #ffe6d7;
background-color: #bcaacf;
}
.nav.navbar-nav li>a {
color: black;
}
嘿@gitly,歡迎堆棧溢出。你能否直接將相關代碼添加到問題中?這使得你更有可能得到體面的答案。 – yochannah 2015-03-13 15:23:14