如何减少导航栏和横幅之间的空白区域..... 我减少了填充和边距,但它没有受到影响.... 在下面提供我的代码.....
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar collapsed" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#" style="padding-top: 0px;">
<img alt="change" class="defieLogo" src="http://www.defie.co/designerImages/defie_logo_only.png">
</a>
<div class="nav-collapse collapse" style="height: 0px;">
<ul class="nav">
<li class="active"><a href="/docs/examples/product.html">Product</a></li>
<li><a href="/docs/examples/solution.html">Solutions</a></li>
<li><a href="/docs/examples/service.html">Services</a></li>
<li class="iphonePartnerLink"><a href="/docs/examples/partner.html">Partners</a></li>
<li class="iphoneContactLink"><a href="/docs/examples/contact.html">Contact</a></li>
</ul>
<ul class="nav" id="navSecond">
<li class=""><a href="/docs/examples/partners.html">Partners</a></li>
<li><a href="/docs/examples/contact.html">Contact</a></li>
</ul>
<form class="navbar-form pull-right">
<input class="span2" type="text" placeholder="Email">
<input class="span2" type="password" placeholder="Password">
<button type="submit" class="btn">Sign in</button>
</form>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
答案 0 :(得分:2)
navbar .navbar-inner {
background: #fff;
color: #000;
box-shadow: none;
-webkit-border-radius: 0;
-moz-border-radius: 0;
-ms-border-radius: 0;
-o-border-radius: 0;
border-radius: 0;
text-shadow: none;
padding: 20px 0 10px; <--- remove this
}
答案 1 :(得分:0)
在CSS的末尾放置以下CSS规则。我认为它会解决你的问题。
.home { padding-top: 47px !important; }
.home article.container { margin-top: 0px !important; }
.navbar { height: 47px !important; }
.navbar .brand { padding: 0 20px 10px !imporatnt; }
您正在使用bootstrap响应,请以较小的浏览器宽度检查您的页面。 Bootstrap正在创建可折叠菜单,这对当前背景来说似乎不太好!
另外,我建议您不要对引导程序文件进行更改,这样就无法更新库。相反,你可以覆盖它们。