Bootstrap - 行可以让列加起来超过 12 吗? [英] Bootstrap - row can I have columns add up to more then 12?
问题描述
我想知道我的嵌套行是否可以加起来超过 12 个?以这种方式工作有错吗?
我试过了,它似乎对我来说效果很好,但我想确保我做对了.
举个例子,我可以拥有这个吗?
<div class="容器"><div class="row"><div class="col-md-3">... </div><div class="col-md-3">... </div><div class="col-md-3">... </div><div class="col-md-3">... </div><div class="col-md-3">... </div><div class="col-md-3">... </div><div class="col-md-3">... </div><div class="col-md-3">... </div>
是的,在 行
中可以有超过 12 列它只会让 额外的列换行到下一行.因此,在您的示例中,您将有 2 行 4.
来自 Bootstrap 文档(http://getbootstrap.com/css/#grid)..
<块引用>"如果在一行中放置了超过 12 列,则每组额外的列将作为一个单元换行"
此外,以下是一些示例,显示在单个 row
中使用超过 12 列 (col-*
):http://getbootstrap.com/css/#grid-example-mixed
如果列的高度不同,请注意响应式重置.阅读更多关于何时使用 Bootstrap 行
<小时>相关问题:
引导会发生什么如果我在一行中放置超过 12 列?
Bootstrap 3 - 连续使用超过 12 列
在哪里放置引导行类
多行上的Boostrap行
I was wondering if my nested row can add up to more then 12? Is it wrong to work this way?
I tried it and it seems to work fine for me, but I want to make sure that I am doing this right.
For an example can I have this?
<div class="col-md-10">
<div class="container">
<div class="row">
<div class="col-md-3"> ... </div>
<div class="col-md-3"> ... </div>
<div class="col-md-3"> ... </div>
<div class="col-md-3"> ... </div>
<div class="col-md-3"> ... </div>
<div class="col-md-3"> ... </div>
<div class="col-md-3"> ... </div>
<div class="col-md-3"> ... </div>
</div>
</div>
</div>
Yes, it's ok to have more that 12 columns in a row
It will just make the extra columns wrap to the next line. So, with your example you'd have 2 rows of 4.
From the Bootstrap docs (http://getbootstrap.com/css/#grid)..
"If more than 12 columns are placed within a single row, each group of extra columns will, as one unit, wrap onto a new line"
Also, here are some examples that show using more than 12 columns (col-*
) in a single row
: http://getbootstrap.com/css/#grid-example-mixed
Just be aware of responsive resets if the columns vary in height. Read more about when to use Bootstrap row
Related questions:
Bootstrap what will happen if I put more than 12 columns in a row?
Bootstrap 3 - Use more than 12 columns in a row
Where to place bootstrap row class
Boostrap row on multiple lines
这篇关于Bootstrap - 行可以让列加起来超过 12 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!