1

如何删除导航横幅与其下方的主横幅图像之间的额外空间?

我删除了填充和边距,但没有任何效果。

我的代码如下。

我不想设置职位。谁能告诉我问题是什么?

<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="http://v2.defie.co/product.html">Product</a></li>
              <li><a href="http://v2.defie.co/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>


<div class="container">
      <header class="hero-unit-product">
        <h1>
            Defie Cloud Business Solutions
            <small>.. changing the way businesses operate.</small>
        </h1>
        <p><a class="btn btn-green btn-large" href="/signup/" data-link="modal" data-target="#signup-modal">Register</a></p>
      </header>
      </div>
4

2 回答 2

2

主要问题与<article class="container">元素有关 - 它具有margin-top: 30px;.

您还必须更改padding-top选择.home器。它设置为55px现在,但必须47px改为。

于 2013-03-05T17:40:46.183 回答
2

空间来自:

.home article.container {
    margin-top: 30px;
}

将其更改为:

.home article.container {
    margin-top: 0;
}
于 2013-03-05T17:41:07.100 回答