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
2007的软件寸相打印软件下载用什么软件调烟雾能在附近约会聊天软件鲁班土建软件2015下载mac arena软件dvd光盘刻制软件用什么软件调烟雾adobexd软件破解版下载小学生 汉字 软件 人教版战舰世界外挂软件2007的软件手机视频有个兔兔是什么软件企查查 软件违法吗用什么软件调烟雾小学生 汉字 软件 人教版游戏出招软件有什么软件可以查电话号码机主姓名有什么软件可以查电话号码机主姓名那种软件可以造生僻字ios11总是软件闪退有什么软件可以查电话号码机主姓名adobexd软件破解版下载教育培训财务管理软件鲁班土建软件2015下载caa是软件能在附近约会聊天软件教育培训财务管理软件mg2580清零软件清零手机视频有个兔兔是什么软件这个世上有鬼吗? 真的有,而且有很多。 我叫徐艺,在我十八岁那年,我猛然发现了这个世界的真相。 天下大乱,烽火狼烟!江湖纷争,血雨腥风!做一世纨绔,饮一壶烈酒,白马纵横,剑歌长行,是棋子?还是执棋者!天启七年,明孝陵突发地震。 一个声音告诉朱元璋,大明要亡了,十七年后,他将代替自己的后辈朱由检,吊死在煤山的歪脖树上。 十七年救不了大明? 瞧不起谁呢! 朱元璋一声令下:来人,给咱把那棵歪脖树砍了! 改善民生! 肃清朝堂! 降服女真! 别的不说,逆天改命这事儿咱最拿手!沉眠三载,不知岁月流江。 废材?不是,是天才! 帝脉天赐,指天斥神张扬。 废体?不是,是神体!天下为敌,为伊孤战八方。 男人的尊严,需自己找回!武逆修神,古今天地至上。 神体开启,不生即死!一朝成神,纵横万载无双! 以异晶淬气,以精魄炼体!天笑我,我笑天! 神体大成,碎灭乾坤!武徒--武者--武师--大武师--武灵--武宗--武尊--武王--武皇--武圣--武帝---------------------------------------【轻松爽文,热血,扮猪吃虎。】虾米个人微信公众号有免费番外可以阅读,zhishixiaoxiami,只是小虾米拼音。一个即将毕业的对生活迷茫的咸鱼少年,一条穿越时空带着传承而来的诡异项链,两者碰撞将会产生怎样的火花? 平静的生活下竟然暗藏玄机,无数光怪陆离层出不穷,究竟是在劫难中迷失自我拥抱死亡,还是在历经磨难后成为 最强的收藏家!浪漫的收藏家陆宇,参见。万物从无到有,能力从弱到强,世界的生存法则以强凌弱,唯有变强才能自保,唯有更强才能护人,唯有最强才能保一方平安。小小少年历经磨难,面冷心善,从无到有,由弱变强,持刀炼身,一步一步走向远方,踏足无上大道。1227年,成吉思汗走了,主人翁来了。 练功,种田,开科技 傲视群雄扫四夷 想打就打,不服就干 弱鸡南宋,有我无敌一颗闪着蓝色光芒的类地星球悬挂在星云的边缘,挡在了人类进军太空的航线上。末世+自然灾害+无系统+求生 气候突变,打破了世界原有的平静,冰川时代降临,幸存者挣扎求生。 面对未知的灾难和危险,一个个小人物组建到一块,共度危机,只为在这末世之下,走的更远在这个世界,有一片大陆名叫普光大陆。 天地间充斥着命之气,每个生物都会觉醒命纹,命纹,是每个生物的强大的基础。 少年巧遇机缘,首次觉醒前所未有的三属性先天灵智命纹!肩负命之兽口中相言的“救世主”之责任。 与命纹配合,共创强大命技;闯重装之谷,打造出成长形神兵。 ...... 何虑万世,我终当隆逢,吾辈同体,我辈同源,自有异理,故吾终当一战,此亦吾身为宿命。 双子临世,自命初之源;续报重求,为如初!
玄天圣剑 异常生物管理局 乱灵纪 来自深渊的威胁 末日世界之异能觉醒 少主凯歌 穿越明朝假太监 高梁河下 游戏太菜,死后入游戏地狱 朗挈名单 彼云端 严舆列传 吾剑永恒 空灵髓 暗黑战灵师 游戏小兵的日常 永恒浩瀚 争锋千里 重生之超级导演 特异行者 思华软件qq好友群发器 ipad上哪个软件看直播软件 游戏出招软件 有什么软件可以查电话号码机主姓名 思华软件qq好友群发器 打印1寸2寸照片的软件下载 哪个微信投票软件用盟点 狸窝ppt转换器软件帐号密码 caa是软件 手机视频有个兔兔是什么软件 adobexd软件破解版下载 现在聊天用什么软件是什么 hdtunepro 软件 推荐 小学生 汉字 软件 人教版 mac arena软件 鲁班土建软件2015下载 哪个微信投票软件用盟点 caa是软件 ios11总是软件闪退 2007的软件 ipad上哪个软件看直播软件 用什么软件调烟雾 寸相打印软件下载 企查查 软件违法吗 小学生 汉字 软件 人教版 hdtunepro 软件 推荐 caa是软件 寸相打印软件下载 ios11总是软件闪退 caa是软件 鲁班土建软件2015下载 ipad上哪个软件看直播软件 恒赛特称重软件下载 2007的软件 教育培训财务管理软件 鲁班土建软件2015下载 恒赛特称重软件下载 游戏出招软件 hdtunepro 软件 推荐 恒赛特称重软件下载 鲁班土建软件2015下载 直播的自动点歌软件下载 那种软件可以造生僻字 现在聊天用什么软件是什么 企查查 软件违法吗 ipad上哪个软件看直播软件 现在聊天用什么软件是什么 能在附近约会聊天软件 mg2580清零软件清零 dvd光盘刻制软件 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 雷剑尊 我与守护灵 村里来了盗墓贼 焚天古神 罪恶神印 百家乐官网 澳门葡京游戏官网 葡京官网 百家乐官网 万利游戏官网 caa是软件 那种软件可以造生僻字 小学生 汉字 软件 人教版 游戏出招软件 mg2580清零软件清零 直播的自动点歌软件下载 那种软件可以造生僻字 新浪微博采集软件官网 鲁班土建软件2015下载 ios11总是软件闪退 ios11总是软件闪退 战舰世界外挂软件 ipad上哪个软件看直播软件 能在附近约会聊天软件 新浪微博采集软件官网 小学生 汉字 软件 人教版 税收调查软件 ntss 哪个微信投票软件用盟点 mg2580清零软件清零 直播的自动点歌软件下载 思华软件qq好友群发器 mac arena软件 税收调查软件 ntss 鲁班土建软件2015下载 hdtunepro 软件 推荐 ios11总是软件闪退 手机视频有个兔兔是什么软件 企查查 软件违法吗 战舰世界外挂软件 恒赛特称重软件下载