Twitter Bootstrap - 在行之间添加顶部空间 [英] Twitter Bootstrap - add top space between rows

查看:181
本文介绍了Twitter Bootstrap - 在行之间添加顶部空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用twitter启动框架将margin顶部添加到 class =row元素?

How to add margin top to class="row" elements using twitter bootstrap framework?

推荐答案

编辑或覆盖在Twitter引导中的行是一个坏主意,因为这是页脚手架的核心部分,您将需要没有顶部边距的行。

Editing or overriding the row in Twitter bootstrap is a bad idea, because this is a core part of the page scaffolding and you will need rows without a top margin.

要解决这个问题,请改为创建一个新类top-buffer,以添加您需要的标准边距。

To solve this, instead create a new class "top-buffer" that adds the standard margin that you need.

.top-buffer { margin-top:20px; }

然后在需要顶部边距的行div上使用它。

And then use it on the row divs where you need a top margin.

<div class="row top-buffer"> ...

这篇关于Twitter Bootstrap - 在行之间添加顶部空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆