原因不明的空间
问题描述:
正在使用bootstrap.min.css我得到两个事业部原因不明的空间
之间
div + div {margin-top:0px;}
如何删除空白
<section id="service" style="background-color:#009999;">
<div class="container">
</div>
</section>
<!-------------white space appear here------------>
<section id="contact" style="background-color:#009999;">
<div class="container">
</div>
</section>
答
.box {
padding: 50px 30px;
background: #fff;
border-bottom: 1px solid #e9e9e9;
position: relative;
}
删除此行border-bottom: 1px solid #e9e9e9;
您不能使用div + div,因为它们位于不同的元素内http://www.w3.org/TR/CSS21/selector.html#adjacent-selectors – monkeyinsight 2014-10-03 04:46:08
您可能需要用你的css代码设置一个(jsfiddle)例子,并完成给你的麻烦区域的html。 PS。希望这两个部分在您的代码中没有相同的“ID” – greener 2014-10-03 04:48:43
@greener我对这两个部分标记都有不同的ID – 2014-10-03 05:03:19