1
1
1
1
1
1
1
1
1
1
1
1
4
4
4
4
8
6
6
12

The default grid system provided as part of Bootstrap is a 940px-wide, 12-column grid.

It also has four responsive variations for various devices and resolutions: phone, tablet portrait, table landscape and small desktops, and large widescreen desktops.

<div class="row">
  <div class="span4">...</div>
  <div class="span8">...</div>
</div>

As shown here, a basic layout can be created with two "columns," each spanning a number of the 12 foundational columns we defined as part of our grid system.


Offsetting columns

4
4 offset 4
3 offset 3
3 offset 3
8 offset 4
<div class="row">
  <div class="span4">...</div>
  <div class="span4 offset4">...</div>
</div>

Nesting columns

With the static (non-fluid) grid system in Bootstrap, nesting is easy. To nest your content, just add a new .row and set of .span* columns within an existing .span* column.

Example

Nested rows should include a set of columns that add up to the number of columns of it's parent. For example, two nested .span3 columns should be placed within a .span6.

Level 1 of column
Level 2
Level 2
<div class="row">
  <div class="span12">
    Level 1 of column
    <div class="row">
      <div class="span6">Level 2</div>
      <div class="span6">Level 2</div>
    </div>
  </div>
</div>

Fluid columns

1
1
1
1
1
1
1
1
1
1
1
1
4
4
4
4
8
6
6
12

Percents, not pixels

The fluid grid system uses percents for column widths instead of fixed pixels. It also has the same responsive variations as our fixed grid system, ensuring proper proportions for key screen resolutions and devices.

Fluid rows

Make any row fluid simply by changing .row to .row-fluid. The columns stay the exact same, making it super straightforward to flip between fixed and fluid layouts.

Markup

<div class="row-fluid">
  <div class="span4">...</div>
  <div class="span8">...</div>
</div>

Fluid nesting

Nesting with fluid grids is a bit different: the number of nested columns doesn't need to match the parent. Instead, your columns are reset at each level because each row takes up 100% of the parent column.

Fluid 12
Fluid 6
Fluid 6
<div class="row-fluid">
  <div class="span12">
    Level 1 of column
    <div class="row-fluid">
      <div class="span6">Level 2</div>
      <div class="span6">Level 2</div>
    </div>
  </div>
</div>
Variable Default value Description
@gridColumns 12 Number of columns
@gridColumnWidth 60px Width of each column
@gridGutterWidth 20px Negative space between columns
@siteWidth Computed sum of all columns and gutters Counts number of columns and gutters to set width of the .container-fixed() mixin

Variables in LESS

Built into Bootstrap are a handful of variables for customizing the default 940px grid system, documented above. All variables for the grid are stored in variables.less.

How to customize

Modifying the grid means changing the three @grid* variables and recompiling Bootstrap. Change the grid variables in variables.less and use one of the four ways documented to recompile. If you're adding more columns, be sure to add the CSS for those in grid.less.

Staying responsive

Customization of the grid only works at the default level, the 940px grid. To maintain the responsive aspects of Bootstrap, you'll also have to customize the grids in responsive.less.

Fixed layout

The default and simple 940px-wide, centered layout for just about any website or page provided by a single <div class="container">.

<body>
  <div class="container">
    ...
  </div>
</body>

Fluid layout

<div class="container-fluid"> gives flexible page structure, min- and max-widths, and a left-hand sidebar. It's great for apps and docs.

<div class="container-fluid">
  <div class="row-fluid">
    <div class="span2">
      <!--Sidebar content-->
    </div>
    <div class="span10">
      <!--Body content-->
    </div>
  </div>
</div>

Responsive devices

What they do

Media queries allow for custom CSS based on a number of conditions—ratios, widths, display type, etc—but usually focuses around min-width and max-width.

  • Modify the width of column in our grid
  • Stack elements instead of float wherever necessary
  • Resize headings and text to be more appropriate for devices

Use media queries responsibly and only as a start to your mobile audiences. For larger projects, do consider dedicated code bases and not layers of media queries.

Supported devices

Bootstrap supports a handful of media queries in a single file to help make your projects more appropriate on different devices and screen resolutions. Here's what's included:

Label Layout width Column width Gutter width
Smartphones 480px and below Fluid columns, no fixed widths
Smartphones to tablets 767px and below Fluid columns, no fixed widths
Portrait tablets 768px and above 42px 20px
Default 980px and up 60px 20px
Large display 1200px and up 70px 30px

Requires meta tag

To ensure devices display responsive pages properly, include the viewport meta tag.

<meta name="viewport" content="width=device-width, initial-scale=1.0">

Using the media queries

Bootstrap doesn't automatically include these media queries, but understanding and adding them is very easy and requires minimal setup. You have a few options for including the responsive features of Bootstrap:

  1. Use the compiled responsive version, bootstrap-responsive.css
  2. Add @import "responsive.less" and recompile Bootstrap
  3. Modify and recompile responsive.less as a separate file

Why not just include it? Truth be told, not everything needs to be responsive. Instead of encouraging developers to remove this feature, we figure it best to enable it.

// Landscape phones and down
@media (max-width: 480px) { ... }
// Landscape phone to portrait tablet
@media (max-width: 768px) { ... }
// Portrait tablet to landscape and desktop
@media (min-width: 768px) and (max-width: 980px) { ... }
// Large desktop
@media (min-width: 1200px) { .. }

Responsive utility classes

What are they

For faster mobile-friendly development, use these basic utility classes for showing and hidding content by device.

When to use

Use on a limited basis and avoid creating entirely different versions of the same site. Instead, use them to complement each device's presentation.

For example, you might show a <select> element for nav on mobile layouts, but not on tablets or desktops.

Support classes

Shown here is a table of the classes we support and their effect on a given media query layout (labeled by device). They can be found in responsive.less.

Class Phones 480px and below Tablets 767px and below Desktops 768px and above
.visible-phone Visible
.visible-tablet Visible
.visible-desktop Visible
.hidden-phone Visible Visible
.hidden-tablet Visible Visible
.hidden-desktop Visible Visible

Test case

Resize your browser or load on different devices to test the above clases.

Visible on...

  • Phone✔ Phone
  • Tablet✔ Tablet
  • Desktop✔ Desktop

Hidden on...

  • Phone✔ Phone
  • Tablet✔ Tablet
  • Desktop✔ Desktop
狗狗得肿瘤不能吃什么狗狗得了肠炎5天还没好狗狗的粑粑断断续续狗狗的粑粑上有粘液狗狗的粑粑有点稀狗狗得疫苗打几联好狗狗的皮肤病 洁尔阴狗狗的粑粑断断续续狗狗大指甲怎么剪狗狗的寄生虫会传染人狗狗的大便上有粘稠物狗狗得肿瘤不能吃什么狗狗的磨牙棒能吃吗狗狗的吃饭时间表狗狗的粑粑断断续续狗狗的寄生虫会传染人狗狗的皮肤病怎么来的狗狗的鼻水很热狗狗的鼻水很热狗狗得癣用什么药外用狗狗倒睫毛示意图狗狗的鼻水很热狗狗大指甲怎么剪狗狗得青光眼早期症状狗狗的粑粑有点稀狗狗得脑炎的几率高么狗狗的粑粑上有粘液狗狗得青光眼狗狗得细小后打完疫苗狗狗的磨牙棒能吃吗[风语有经年]是集散文、美文、短篇、诗词、短小说等为一体的抒怀作品,值得文学爱好者欣赏。原在海外执行任务的萧剑沣被师傅召回去营救白泰国际集团董事长儿子,从此进入都市发展,一路美女相随,一路护花除恶,最终抱得美女一大堆。画皮之真爱无悔浮生和小唯的续写,很多年了重温了无数遍很喜欢他们的故事,想要续写一个完美结局。 上古洪荒之神面对天道何去何从,新的使命被天道赋予,人间炼狱场已经开启,心之血脉相连的仅仅是生命还是其他,若要我还你一句誓言,那便是永世!我许下的承诺定要你牢牢记在心里,永生永世不相弃!天界至宝天神之怒碎裂成两半,从此消失不见,天界由此陷入混乱。要想天界恢复秩序,必须寻回天神之怒。在天界遍寻无果之下,众天神不由束手无策。 邢毅开车送公司经理亲属回乡下,回来遇到暴雨将他冲进山洞,被同事从工厂深水泵井里救出,意外发现自己重生回到二十五年前。 前世上,他二十五岁时进入锦绣县宏达道桥公司,这里有高中时的同学,公司的骨干精英,未来的掌舵者。然而并没有得到同学的关照,反而遭遇冷落,被瞧不起。 他干的是混泥土搅拌工,钢筋帮扎工,搬运工等等,二十五年都在基层一线,因能力弱,胆子小,没能耐,无法扭转自己的命运以及家庭生活面貌,妻子在邮电局做职员,屡被上司欺凌,儿子到就读年龄择校时门槛高耸,父亲被冤屈下放农村,母亲患病也未能进行最好的治疗……一句话,他一辈子活得类,窝囊,不值。 上苍安排,让他的人生再来一次,从此他的工作,事业,爱情,父母、家庭,孩子……且看他怎样展开,怎样掌控渐次而来的机会,怎样应对一并降临的竞争和阻碍,完成新的使命,从而实现人生逆袭。也不知该怎么说。这应该是一部用穿越的视角重温年代的小说。记录着关于斯卡德科技世界观及背景,其他的小说可以使用里面的任何设定,任何人都可以使用(需要提前标注),会不定期更新。牛天是一个孤儿,自幼被父母抛弃,由于误吃了千年灵芝和毒蟒的血,使自己意外的变成了一个拥有神奇能力的人,他开矿厂开荒种药材,建养殖区,一夜之间暴富,带领全村人走上致富之路,且看一个无名小子,如何从一个小农民逆转命运,叱咤都市。张元清,河南人氏。生于明嘉靖三十六年,其祖上有恩于朝廷,特在县城造一府邸,祖上为防日后祸乱,又起造城墙,招兵买马,收募官员,名为张氏城府。万历十一年,山东一带陈希真等贼人作乱,朝廷大将身死,朝廷发一招贤榜,元清观后与村中几个玩伴前往京城,领数万军马征伐。互有伤亡,终平定匪患。元清遇一道人,道人送三粒仙药号能长生。元清服下一粒,给心中情人李金凤及好友胡志杰服下一粒,张元清于老家欢快数年,后遭数件坏事,其姑祖母认定屋子风水不好,全家搬至浙江万央镇。后张元清又经历抗击满清和洋人之战,期间李金凤身死。清政府退位后,城府被迫关封,张元清去伏仙山求道。二十年后张元清下山云游。眼下正是抗日全面爆发,元清加入以王正终为首的青平山义军,与日寇周旋,后抗战胜利,义军关寨解散,张元清归隐于青锋山修道。结识了六位道友,在一天夜里做一梦,与一群黑影打斗,却看不清他们脸面,张元清背靠一堵墙持剑自尽,张元清惊醒…… 这是一个近似未来地球的异世界。 名为“黑石”的神秘矿物能将人的情绪与欲望收割转化,为这个世界提供了近乎无穷无尽的能源。 普通人就是被无尽收割的活能源,如同“工具”和“零件”生存。 财团,高官,各种特权者们争权夺利。 而他将颠覆这个世界的规则。
李二:收手吧!大唐已经无敌了 网游之战国策 吞宇帝尊 重生之我在仙界修神系统 以无为名 神探狄仁杰1 第九世轮回之劫 天残补命录 全球末世:我能无限升级 我在高中三年无限重生 一个妖精的故事 青讲鬼故事 阎王转世录 诡成仙 寻找五五开 青龙大战黑龙潭第二部 天罗神功 白富美的贴身高手 取名真的好难 蛆先生的一生 狗狗得了指间炎怎么办 狗狗的广告词 狗狗的皮肤病怎么来的 狗狗的鼻水很热 狗狗得了指间炎怎么办 狗狗得皮藓图 狗狗大腿内侧有肉瘤 狗狗的脚掌有小白点 狗狗得脑炎的几率高么 狗狗的磨牙棒能吃吗 狗狗大指甲怎么剪 狗狗大腿脱臼 狗狗得青光眼早期症状 狗狗的寄生虫会传染人 狗狗得疫苗打几联好 狗狗的粑粑有点稀 狗狗大腿内侧有肉瘤 狗狗得脑炎的几率高么 狗狗倒睫毛示意图 狗狗得肿瘤不能吃什么 狗狗的广告词 狗狗的粑粑断断续续 狗狗得了肠炎5天还没好 狗狗的吃饭时间表 狗狗的寄生虫会传染人 狗狗得青光眼早期症状 狗狗得脑炎的几率高么 狗狗得了肠炎5天还没好 狗狗倒睫毛示意图 狗狗得脑炎的几率高么 狗狗的粑粑有点稀 狗狗的广告词 狗狗的粑粑多 狗狗得肿瘤不能吃什么 狗狗得青光眼 狗狗的粑粑有点稀 狗狗的粑粑多 狗狗大腿内侧有肉瘤 狗狗得青光眼早期症状 狗狗的粑粑多 狗狗的粑粑有点稀 狗狗的狂犬病怎么来的 狗狗得癣用什么药外用 狗狗大腿脱臼 狗狗的吃饭时间表 狗狗的广告词 狗狗大指甲怎么剪 狗狗的粑粑上有粘液 狗狗得细小后打完疫苗 狗狗的皮肤病 洁尔阴 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 遗春楼:我撩尽天下美女 我在人世间混日子的那些年 道门幸存者 俗世道途 他们在干什么集 欧博官网 万利官网 欧博游戏官网 亚星游戏官网 葡京官网 狗狗得脑炎的几率高么 狗狗的鼻水很热 狗狗的配种狗后的症状 狗狗的大便上有粘稠物 狗狗的鼻水很热 狗狗大指甲怎么剪 狗狗的吃饭时间表 狗狗的寄生虫会传染人 狗狗大腿脱臼 狗狗的脚掌有小白点 狗狗得疫苗打几联好 狗狗的磨牙棒能吃吗 狗狗得疫苗打几联好 狗狗得脑炎的几率高么 狗狗得肿瘤不能吃什么 狗狗的皮肤病 洁尔阴 狗狗的粑粑上有粘液 狗狗的皮肤病怎么来的 狗狗得脑炎的几率高么 狗狗大腿脱臼 狗狗的皮肤病怎么来的 狗狗得癣用什么药外用 狗狗大腿内侧有肉瘤 狗狗戴嘴套发疯 狗狗得细小后打完疫苗 狗狗倒睫毛示意图 狗狗的寄生虫会传染人 狗狗得了指间炎怎么办 狗狗的寄生虫会传染人 狗狗的粑粑有点稀