删除导航栏和 header 之间的 space

Remove space between navbar and header

我在 bootstrap 导航栏下方有一个奇怪的边距,我不知道如何删除它。任何使用边距或填充进行操作的解决方案都不起作用。

HTML

<nav class="navbar navbar-default navbar-fixed-top">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                <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="#"><span class="glyphicon glyphicon-home"></span></a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="active"><a href="#">Active example <span class="sr-only">(current)</span></a></li>
                <li><a href="#">Example 3</a></li>
                <li><a href="#">Example 2</a> </li>
            </ul>
        </div>
    </div>
</nav>

<!-- HEADER -->
    <div class="container-fluid" style="margin-top: -20px; margin-bottom: 25px;">
        <div class="row">
            <img src="http://thehrblog.ecornell.com/wp-content/uploads/sites/2/2013/04/communication.png" class="img-responsive">
        </div>
    </div>

CSS

.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
    background-color: #007DBE;
    color: #FFF;
}

示例在这里:Jsfiddle(如果导航栏中的菜单被隐藏,请调整大小 'Result')。

我需要删除这个 space:

得到这个:

文件 navbar.less 正在导航栏上添加 border

.navbar-fixed-top {
    top: 0;
    border-width: 0 0 1px;
}

所以你可以用这个来重置:

.navbar-fixed-top {
    border:0;
}

UpdatedFiddle

改变

.navbar-fixed-top {
    border-width: 0 0 1px;
    top: 0;
}

.navbar-fixed-top {
    border-width: 0;
    top: 0;
}