【问题标题】:Dividing bootstrap column under col-1在 col-1 下划分引导列
【发布时间】:2017-12-08 00:56:08
【问题描述】:

我希望能够进一步划分引导 gid。没有太多麻烦或解决方法。创建网格的 1/24 列的最佳方法是什么。

为了更好地理解我的意思:https://jsfiddle.net/Lmm1ra7d/

<div class='row'>
    <div class="col-xs-8">8/12</div>
    <div class="col-xs-4">4/12</div>
</div>

<br/>
Now I need to transform this to  a 0.5/12 => 1/24 What would be the best approach without a hacky fix. Also not to break the responsiveness.
This is the smallest column bootstrap can make 8.3333%
<br/>
<br/>

<div class='row'>
    <div class="col-xs-1">1/12</div>
    <div class="col-xs-11">11/12</div>
</div>


<br/>
What I really want would be 4%
<br/>
<br/>

<div class='row'>
    <div style="width:3%; display: inline-block;">1/24</div><div style="width:96%;display: inline-block;">23/24</div>
</div>

【问题讨论】:

    标签: html css twitter-bootstrap responsive-design


    【解决方案1】:

    您可以在col-*-1 中嵌套另一个列设置。如果不需要嵌套行/列上的填充,您可以添加一个类来覆盖填充。

    <div class="row">
        <div class="col-xs-1">
            <div class="row">
                <div class="col-xs-6"></div>
                <div class="col-xs-6"></div>
            </div>
        </div>
    </div>
    

    【讨论】:

      【解决方案2】:

      您可以在一列中嵌套一行,因此基本上您将主行划分为其他行。例如

          <div class="row">
           <div class="col-sm-3">
            <!-- now you have 1/4 -->
             <div class="row">
              <div class="col-sm-3">
               <!-- now you have 1/4 of 1/4 -->
              </div>
             </div>
           </div>
          </div>
      

      【讨论】:

        猜你喜欢
        • 2016-07-22
        • 2018-10-22
        • 2018-12-01
        • 2017-02-21
        • 2015-11-09
        • 2017-07-17
        • 1970-01-01
        • 2018-01-09
        • 1970-01-01
        相关资源
        最近更新 更多