You'd normally use .row
to wrap two columns, not .col-md-12
- that's a column encasing another column.
(您通常使用.row
来包装两列,而不是.col-md-12
- 这是一个包含另一列的列。)
Afterall, .row
doesn't have the extra margins and padding that a col-md-12
would bring and also discounts the space that a column would introduce with negative left & right margins. (毕竟, .row
没有col-md-12
带来的额外边距和填充,并且.row
列将带有负左右边距的空间。)
<div class="container">
<div class="row">
<h2>OntoExplorer<span style="color:#b92429">.</span></h2>
<div class="col-md-4 nopadding">
<div class="widget">
<div class="widget-header">
<h3>Dimensions</h3>
</div>
<div class="widget-content">
</div>
</div>
</div>
<div class="col-md-8 nopadding">
<div class="widget">
<div class="widget-header">
<h3>Results</h3>
</div>
<div class="widget-content">
</div>
</div>
</div>
</div>
</div>
if you really wanted to remove the padding/margins, add a class to filter out the margins/paddings for each child column.
(如果您真的想要删除填充/边距,请添加一个类来过滤掉每个子列的边距/填充。)
.nopadding {
padding: 0 !important;
margin: 0 !important;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…