html - 在 col-1 下划分 bootstrap 列

标签 html css twitter-bootstrap responsive-design

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

enter image description here

fiddle 以更好地理解我的意思: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>

最佳答案

您可以在 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>

关于html - 在 col-1 下划分 bootstrap 列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47680222/

相关文章:

javascript - 如何避免 JavaScript 小部件中的名称冲突

html - 删除图像标签 HTML/CSS 之间的水平间隙

css - <button> 在 Firefox 中不可点击,但在 chrome 中有效

javascript - 我如何强制重新渲染模态?

html - 两个 div 在另一个 div 中的垂直对齐而不使用显示 :flex

javascript - 基于悬停元素添加多种样式

javascript - 当悬停时附加了上下文菜单时,选项卡单击不起作用

css - 标题在 WordPress 中未显示全宽

html - EDM 模板中的顶部对齐 <td>

css - 希望将 Bootstrap Pulldown 移动到按钮的左侧。 PHP网页