如何使用Twitter Bootstrap 2获得16列响应式布局? [英] How do I get a 16 column responsive layout with Twitter Bootstrap 2?

查看:79
本文介绍了如何使用Twitter Bootstrap 2获得16列响应式布局?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从各种论坛帖子中得到的信号参差不齐.它是否通过更改本机存在:

I'm getting mixed signals from various forum posts. Does it exist natively by changing:

// Default 940px grid
// -------------------------
@gridColumns:             12;
@gridColumnWidth:         60px;
@gridGutterWidth:         20px;
@gridRowWidth:            (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));

// Default 940px grid
// -------------------------
@gridColumns:             16;
@gridColumnWidth:         40px;
@gridGutterWidth:         10px;
@gridRowWidth:            (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));

创建16列布局需要做的所有事情吗?我见过一些论坛帖子,说您必须在选择器span11-16中进行硬编码才能使其起作用,因为自Bootstrap 2.0起,它们就不再存在,并且不能动态创建.

Is that all I need to do to create a 16 column layout? I've seen some forum posts saying that you have to go hard-code in selectors span11-16 for it to work because those no longer exist since Bootstrap 2.0 and can't be dynamically created.

推荐答案

好吧,我刚刚尝试过,它可以正常生成16列.您是否查看过此页面并尝试自定义下载内容?

Well I just tried and it generates 16 columns fine. Have you looked at this page and tried customizing your download?

http://twitter.github.com/bootstrap/download.html

此外,如果您查看mixins(网格)的556行,则会看到生成跨度的函数.生成跨度时会考虑总列数.

Also, if you take a look at line 556 of the mixins (The Grid), you'll see the function that generates the spans. It takes the total column count into account when generating the spans.

https://github.com/twitter/bootstrap/blob/master/less/mixins.less

换句话说,你很好.

这篇关于如何使用Twitter Bootstrap 2获得16列响应式布局?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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