如何在Bootstrap 3中获取半列? [英] How to get half columns in Bootstrap 3?

查看:136
本文介绍了如何在Bootstrap 3中获取半列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个2.5列和9.5列在Bootstrap 3.有人可以给我一个解决方案吗?我发现唯一的答案是一个3列的分区。我需要2个半列。

I need a 2.5 column and a 9.5 column in Bootstrap 3. Can somebody please give me a solution? The only answer i've found is a partition of 3 columns. i need 2 half-columns.

推荐答案

如果你使用的bootstrap sass文件,你可以这样做:

If you are using the bootstrap sass files you can do it this way:

.col-md-half {
   @extend .col-md-1;
   width: percentage((0.5 / $grid-columns));
}

这与Ardee Aram的解决方案类似,但使用引导$ grid -columns变量。

This is a similar to Ardee Aram's solution but makes use of the bootstrap $grid-columns variable instead.

这篇关于如何在Bootstrap 3中获取半列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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