在固定的960px布局的twitter引导应该设置什么值? [英] What values I should set in twitter bootstrap for a fixed 960px layout?

查看:91
本文介绍了在固定的960px布局的twitter引导应该设置什么值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用twitter bootstrap与从github克隆较少。我想设置网格宽度变量,因为我需要一个960px的固定布局。 940px宽度的默认值为:

  @gridColumns:12; 
@gridColumnWidth:60px;
@gridGutterWidth:20px;

我应该为固定的960px布局设置什么值?



我试过这个,但结果是950px:

  @gridColumns:12; 
@gridColumnWidth:70px;
@gridGutterWidth:10px;


解决方案

解决方程式



您需要找到

  @gridColumns:12; 
@gridColumnWidth:69px;
@gridGutterWidth:12px;

另一个:

  @gridColumns:12; 
@gridColumnWidth:58px;
@gridGutterWidth:24px;



但使用默认



Bootstrap 设计为960像素宽度,它只是不指定额外的边距/填充侧:

  | ------------------------------ 960px width ------------------ ---------------- | 
10px left margin | ------------- 940px container ------------ | 10px right margin

因此,如果您定位960像素,我建议您使用默认值。 p>

I'm using twitter bootstrap with less cloned from github. I want to set grid width variables because I need a 960px fixed layout. Default values for 940px width are:

@gridColumns:             12;
@gridColumnWidth:         60px;
@gridGutterWidth:         20px;

What values I should set for a fixed 960px layout?

I tried with this, but result was 950px:

@gridColumns:             12;
@gridColumnWidth:         70px;
@gridGutterWidth:         10px;

解决方案

Solve the equation

You need to find a solution(s) for the equasion. One of them is:

@gridColumns:             12;
@gridColumnWidth:         69px;
@gridGutterWidth:         12px;

another one:

@gridColumns:             12;
@gridColumnWidth:         58px;
@gridGutterWidth:         24px;

But use default

Bootstrap was designed for 960px width, it just doesn't specify additional margin/padding on the sides:

| ------------------------------ 960px width ---------------------------------- |
10px left margin | ------------- 940px container ------------ | 10px right margin

So I suggest you to use the default values, if you are targeting 960px.

这篇关于在固定的960px布局的twitter引导应该设置什么值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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