<i id='dsylv'><tr id='dsylv'><dt id='dsylv'><q id='dsylv'><span id='dsylv'><b id='dsylv'><form id='dsylv'><ins id='dsylv'></ins><ul id='dsylv'></ul><sub id='dsylv'></sub></form><legend id='dsylv'></legend><bdo id='dsylv'><pre id='dsylv'><center id='dsylv'></center></pre></bdo></b><th id='dsylv'></th></span></q></dt></tr></i><div id='dsylv'><tfoot id='dsylv'></tfoot><dl id='dsylv'><fieldset id='dsylv'></fieldset></dl></div>
    <tfoot id='dsylv'></tfoot>

      <bdo id='dsylv'></bdo><ul id='dsylv'></ul>
    <legend id='dsylv'><style id='dsylv'><dir id='dsylv'><q id='dsylv'></q></dir></style></legend>
  1. <small id='dsylv'></small><noframes id='dsylv'>

    1. Bootstrap 的每行网格列数

      时间:2023-08-01
        <tbody id='4jXcW'></tbody>
    2. <tfoot id='4jXcW'></tfoot>
        <i id='4jXcW'><tr id='4jXcW'><dt id='4jXcW'><q id='4jXcW'><span id='4jXcW'><b id='4jXcW'><form id='4jXcW'><ins id='4jXcW'></ins><ul id='4jXcW'></ul><sub id='4jXcW'></sub></form><legend id='4jXcW'></legend><bdo id='4jXcW'><pre id='4jXcW'><center id='4jXcW'></center></pre></bdo></b><th id='4jXcW'></th></span></q></dt></tr></i><div id='4jXcW'><tfoot id='4jXcW'></tfoot><dl id='4jXcW'><fieldset id='4jXcW'></fieldset></dl></div>

        • <small id='4jXcW'></small><noframes id='4jXcW'>

            <bdo id='4jXcW'></bdo><ul id='4jXcW'></ul>

          • <legend id='4jXcW'><style id='4jXcW'><dir id='4jXcW'><q id='4jXcW'></q></dir></style></legend>

                本文介绍了Bootstrap 的每行网格列数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                Bootstrap 带有一个 12 列的网格系统,必须放置在行内.

                Bootstrap comes with a 12 columns grid system that must be placed within rows.

                我的问题是,列号/行是否必须为 12(或更少),或者我可以有如下布局

                My question is, does the column number / row must be 12 (or less), or can I have a layout like the following

                <div class="row">
                  <div class="col-md-4"></div>
                  <div class="col-md-4"></div>
                  <div class="col-md-4"></div>
                  <div class="col-md-4"></div>
                  <div class="col-md-4"></div>
                  <div class="col-md-4"></div>
                </div>
                

                我的理解是一行中的列数不能超过 12,所以根据我之前的代码段,我会做这样的事情

                My understanding was that columns number within a row mustn't exceed 12, so based on my previous snippet, I would have made something like this

                <div class="row">
                  <div class="col-md-4"></div>
                  <div class="col-md-4"></div>
                  <div class="col-md-4"></div>
                </div>
                <div class="row">
                  <div class="col-md-4"></div>
                  <div class="col-md-4"></div>
                  <div class="col-md-4"></div>
                </div>
                

                有什么我错过的吗?

                推荐答案

                Bootstrap 允许你堆叠列",以下摘自他们的 文档:

                Bootstrap allows you to "stack columns", the following is taken from their docs:

                <!-- Stack the columns on mobile by making one full-width and the other half-width -->
                <div class="row">
                  <div class="col-xs-12 col-md-8">.col-xs-12 .col-md-8</div>
                  <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
                </div>
                
                <!-- Columns start at 50% wide on mobile and bump up to 33.3% wide on desktop -->
                <div class="row">
                  <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
                  <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
                  <div class="col-xs-6 col-md-4">.col-xs-6 .col-md-4</div>
                </div>
                

                也来自他们的 docs:

                由于有四层网格可用,您一定会遇到这样的问题,即在某些断点处,由于一层比另一层高,您的列并不能完全正确地清除.要解决此问题,请结合使用 .clearfix 和我们的响应式实用程序类.

                With the four tiers of grids available you're bound to run into issues where, at certain breakpoints, your columns don't clear quite right as one is taller than the other. To fix that, use a combination of a .clearfix and our responsive utility classes.

                <div class="row">
                  <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
                  <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
                
                  <!-- Add the extra clearfix for only the required viewport -->
                  <div class="clearfix visible-xs"></div>
                
                  <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
                  <div class="col-xs-6 col-sm-3">.col-xs-6 .col-sm-3</div>
                </div>
                

                这里 col-xs 的值加起来是 24,使用 clearfix 添加所需的中断

                Here, the col-xs values add up to 24, with a clearfix adding the required break

                这篇关于Bootstrap 的每行网格列数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:jQuery 图像网格系统 下一篇:Boostrap 3 - col-md-4 到 col-sm-6,或 3x2 到 2x3 的网格

                相关文章

                <tfoot id='LWdBz'></tfoot>

                <small id='LWdBz'></small><noframes id='LWdBz'>

                  1. <i id='LWdBz'><tr id='LWdBz'><dt id='LWdBz'><q id='LWdBz'><span id='LWdBz'><b id='LWdBz'><form id='LWdBz'><ins id='LWdBz'></ins><ul id='LWdBz'></ul><sub id='LWdBz'></sub></form><legend id='LWdBz'></legend><bdo id='LWdBz'><pre id='LWdBz'><center id='LWdBz'></center></pre></bdo></b><th id='LWdBz'></th></span></q></dt></tr></i><div id='LWdBz'><tfoot id='LWdBz'></tfoot><dl id='LWdBz'><fieldset id='LWdBz'></fieldset></dl></div>
                  2. <legend id='LWdBz'><style id='LWdBz'><dir id='LWdBz'><q id='LWdBz'></q></dir></style></legend>
                    • <bdo id='LWdBz'></bdo><ul id='LWdBz'></ul>