我想在bootstrap中更改导航栏的高度。我的代码:
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<div class="navbar-brand">MyDatoo</div>
</div>
<ul class="nav navbar-nav">
<li><a href="#">Home</a></li>
<li><a href="#">Page 1</a></li>
<li><a href="#">Page 2</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#"><span class="glyphicon glyphicon-user"></span> Sign Up</a></li>
<li><a href="#"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
</ul>
</div>
</nav>
答案 0 :(得分:2)
.navbar {
height: 100px !important; /*i assume your navbar size 100px*/
}
如果您处理移动
@media only screen and (min-width: 600px) {
.navbar {
height: 100px !important;
}
}
@media only screen and (min-width: 768px) {
.navbar {
height: 120px !important;
}
}
答案 1 :(得分:0)
您可以添加此css
.navbar {
height: YOUR_SIZE !important;
}