我可以在bootstrap中加入col-md-1.5吗? [英] Can I give the col-md-1.5 in bootstrap?

查看:748
本文介绍了我可以在bootstrap中加入col-md-1.5吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想调整Twitter BoOtstrap中的列。

我知道在bootstrap中有12列网格。是否有任何方法来操纵网格有1.5 3.5 3.5 3.5而不是3 3 3 3?解决方案

正确@ bodi0正确说,这是不可能的。您必须扩展Bootstrap的网格系统(您可以搜索并查找各种解决方案,此处为7列示例)或使用嵌套行,例如 http://bootply.com/dd50he9tge



在嵌套行的情况下,您可能并不总是得到确切的结果,但类似的结果

 < div class =row> 
< div class =col-lg-5>
< div class =row>
< div class =col-lg-4> 1.67(接近1.5)< / div>
< div class =col-lg-8> 3.33(接近3.5)< / div>
< / div>
< / div>
< div class =col-lg-7>
< div class =row>
< div class =col-lg-6> 3.5< / div>
< div class =col-lg-6> 3.5< / div>
< / div>
< / div>
< / div>


I want to adjust the columns in Twitter Boοtstrap.

I know in bootstrap there are 12 columns grid. Is there any way to manipulate the grids to have 1.5 3.5 3.5 3.5 instead of 3 3 3 3?

解决方案

As @bodi0 correctly said, it is not possible. You either have to extent Bootstrap's grid system (you can search and find various solutions, here is a 7-column example) or use nested rows e.g. http://bootply.com/dd50he9tGe.

In the case of nested rows you might not always get the exact result but a similar one

<div class="row">
    <div class="col-lg-5">
        <div class="row">
            <div class="col-lg-4">1.67 (close to 1.5)</div>
            <div class="col-lg-8">3.33 (close to 3.5)</div>
        </div>    
    </div>
    <div class="col-lg-7">
        <div class="row">
            <div class="col-lg-6">3.5</div>
            <div class="col-lg-6">3.5</div>
        </div>    
    </div>
</div>

这篇关于我可以在bootstrap中加入col-md-1.5吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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