【发布时间】:2017-06-10 11:52:53
【问题描述】:
我正在使用 bootstraps gird,我得到了列之间的差距:
p {
height: 400px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="row">
<div class="col-md-6">
<p>Huge text</p>
</div>
<div class="col-md-6">
<p>Huge text</p>
</div>
</div>
</div>
【问题讨论】:
-
发生这种情况是因为列通过填充创建了排水沟(列内容之间的间隙)。该填充通过 .rows 上的负边距在第一列和最后一列的行中偏移。
-
在发布关于 SO 的问题之前,请先进行一些研究。检查这个Question
-
每一列
col左右都有 15px 的内边距。
标签: html css twitter-bootstrap