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

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

问题描述

如何使用 twitter bootstrap 框架为 class="row" 元素添加边距顶部?

解决方案

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

要解决此问题,请创建一个新类top-buffer",以添加您需要的标准边距.

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

然后在需要上边距的行 div 上使用它.

...

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

解决方案

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.

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

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

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

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

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

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