Twitter Bootstrap 流体跨度打破了模板 [英] Twitter Bootstrap fluid spans broke template

查看:36
本文介绍了Twitter Bootstrap 流体跨度打破了模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用跨度表时.我得到流体表.如何在没有这些奇怪空间的情况下获得一张平坦的桌子?图片说明哪里错了:

When i try to get a table with spans. I get fluid table. How to get a flat table without these strange spaces? Picture to explain what wrong:

源页面的完整列表https://gist.github.com/2984012

推荐答案

开头无空格

问题

出现在第 3 行的空格是 bootstrap 的一个特性":容器的第一个 span 没有左边距.

No space at the beginning

Problem

The space that appears on the 3rd line is a "feature" of bootstrap : the first span of a container has no left margin.

[class*="span"]:first-child {
    margin-left: 0;
}

(来源:https://github.com/twitter/bootstrap/blob/master/less/mixins.less#L613)

您可以在第一项之前添加一个不可见的 .span 元素:这样第一项也会有一个空格.

You can add an invisible .span element before the first item : that way the first item will have a space too.

<div class="span" style="display: none;"></div>

布局中的漏洞

问题

你的第一件物品似乎更长(高度).

Hole in the layout

Problem

Your first item seems to be longer (in height).

您似乎已经设置了最小高度,但您应该确定一个最大高度,或者确保没有任何项目超过最小高度.

It appears you have set a minimum height, but you should fix a maximum height, or ensure that there are no items longer than the minimum height.

这篇关于Twitter Bootstrap 流体跨度打破了模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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