【发布时间】:2013-09-16 22:05:16
【问题描述】:
使用 twitter bootstrap v3 rc1。
我的页面上有三个 .sub-content-block div,带有 .make-column(4);应用于每个。
我已经尝试添加 .make-row;到一个包含所有三个子内容块 div 的 div,并将其也设置为 .make-column(12),希望每个 div 之间有间距。
正如你在屏幕截图中看到的,每个 div 之间没有间距,如果我没有背景颜色,看起来好像有一些间距,但那更像是填充而不是间距。
gutter 宽度在 variables.less 文件中设置为 30px。
感谢任何关于为什么每个 div 之间没有间距的说明。
.sub-content-block {
.make-column(4);
background: @box-bg-color;
a {
color: #fff;
text-decoration: none;
}
a:link {
color:#fff;
padding:5px;
background: @block-link-hover;
}
a:hover {
background: #000;
}
}
<div class="sub-content-block">
<h4>Get Fast Quote</h4>
<p>Get a fast quote, or schedule an on-site estimate.</p>
<p><a href="">Learn More</a></p>
</div>
<div class="sub-content-block">
<h4>Get Fast Quote</h4>
<p>Get a fast quote, or schedule an on-site estimate.</p>
<p><a href="">Learn More</a></p>
</div>
<div class="sub-content-block">
<h4>Get Fast Quote</h4>
<p>Get a fast quote, or schedule an on-site estimate.</p>
<p><a href="">Learn More</a></p>
</div>
【问题讨论】:
-
可以加个jsfiddle吗?
-
不,我严格使用 LESS,使用 twitter bootstrap 的 mixins。我可以粘贴它编译的 css,但我正在尝试严格使用 twitter bootstrap v3 rc1 的 less 来完成此操作
标签: html css less twitter-bootstrap-3