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
nbmc 歌词诚信是福许霖歌词歌词痴痴mc汪峰我如此爱你歌词原唱阳光总在风雨后歌词及简谱nbmc 歌词空格的歌词歌词痴痴mc如果我能改变世界歌词歌词中带美丽中国的歌曲歌词划船歌西班牙民歌歌词歌词痴痴mc孤帆 泛音堂 歌词划船歌西班牙民歌歌词you liked way歌词歌词中带美丽中国的歌曲歌词歌词《拾忆》永远的蒙古汉语歌词阳光总在风雨后歌词及简谱地下的玫瑰歌词孔子歌词东方有家圆永远的蒙古汉语歌词如果我能改变世界歌词皮皮虾歌词刘德华潮水汉语歌词英语超级冠军 歌词刘德华潮水汉语歌词皮皮虾歌词地下的玫瑰歌词海阔天空歌词余家辉 完整版春秋五霸,战国七雄,合纵连横,逐鹿中原本文根据民间传说以及部分地方史志创作完成,从一个一个小小的侧面,为读者展现围绕鞶镇这片北方的土地上,人们生生不息,千年来上演的一幕幕世事人伦、爱恨情仇及家国情怀。本文由一些相对独立的故事组成,虽有关联但不紧凑。首先,从一个人物说起……“云雨流动,荡彻蛟龙;平震惊雷,境源成谷不知此何间汤泉亦在此。”江湖百年间,常流传于世,不管多少辈人更替,却总有人想寻到此。 太阳落于下,光阴散于间,常有人言“汤泉异宝,繁如星辰,连震于宫,进之者,必成一代宗师。”此佳话谈笑于风云之间,江湖代代相传,为矢后人子孙谨记。 径者事分二,其言只不过是其中的一半,石碑所雕后传为“得宝者,映汤泉,落阴黄泉,永世献不入堂,唯有善终其章,其予鬼神,方换一世圣德,此乃天间邢之问也;此旅之称,汤问!”父母神秘失踪,只留下四样东西: 1封信、1万块钱、1枚扳指,1瓶老酒。 “小烨:18岁前,不许喝酒,不许找我们。” 今晚过后,苏烨就满18岁了。 喝不喝那瓶酒呢? 喝了之后将会发生什么? 这是苏烨面临的两个问题!强悍与正义一直是我的代名词蓝星的一个码农,因公会副本开荒猝死,穿越异世界。 迟到的金手指貌似永远也不会到来。前期靠恩人的一本体术苟活,后期靠前世记忆与能力,将魔法格式化并自制金手指,开发操作系统,研发魔法应用程序,逐步成为异世界顶尖的存在。 两万年前一场大战,使得整片大陆四分五裂,入流不入流的国家有几百个。经过时间的洗礼,虽说数量上没少多少,但逐渐形成了三大巨头:东伯雷国,豪斯国和希国。 此时的希国,由一伙侏儒族入侵,统治了四百年之久,开始出现松动,民间有地痞恶霸,地方有贪官污吏,皇城有买官卖官。生活在希国的老百姓苦不堪言,怨声载道。尤其是因为两万年前大战后产生的混血种更是有多数沦为奴隶,过着猪狗不如的生活。 我们的程序员从一个小小的魔法学徒开始,经过自己一步步的努力,终于称霸一方,成为大陆最顶尖的存在,然而他的崛起引发了新的问题,就是两万年前的恶魔由于他的缘故复活了……后面究竟会发生什么???一个喜欢吃凉面的男孩却意外穿越到异世界,却凭借着凉面扬名整个世界,是命运的安排,还是执棋人的棋子…… 传说有个神秘的种族,拥有毁天灭地的力量隐藏在黑暗中,世代守护着地球的安宁。每到时代的风口浪尖,他们就会出现引领人们走向光明。 百年前地球陷入危机,丧尸,机甲,病毒,变种生物,外星种族席卷整个地球……在灾难面前普通人形同蝼蚁,不堪一击。 哀嚎!绝望!毁灭!唤醒了沉睡的力量! 华夏大地纷纷涌现身高百丈的巨人,手握长剑的剑士,神兽虚影……从此大混乱时期开始七年征战,封七珠王帅。 怎料老婆被关鸭圈,被人绑走还要割走肾脏,女儿下落不明,动我妻女,诛杀九族!直播算命只是表面,解救芸芸众生才是本意。 龙木生习得祖传医卜星象之术,替世人排忧解难,趋吉避凶。 而龙木生也利用这先天优势,开启了装逼之路。
类地行星468号 破损乐园 战神联盟穿越了之哥哥 穿越都市被倒追 圣人鱼 穿越之我在南宋那些事儿 食味滋 重活五万年 缔 世 子星记 我复活在神魔战场 全职相师 幻想代码 我是up主 神明禁行 预案 九龙风水师 黑色兰花劫 大宋:神级抽奖系统 九天界限 ?郅韦?たまり罗马音歌词 歌曲《童年》的歌谱加歌词 歌词《拾忆》 阳光总在风雨后歌词及简谱 诚信是福许霖歌词 小小戒指歌词 歌词《拾忆》 我关爱别人的歌词 英语超级冠军 歌词 孤帆 泛音堂 歌词 忘记我自己歌词什么 忘记我自己歌词什么 爱情转移道歌词 歌曲《童年》的歌谱加歌词 nbmc 歌词 阳光总在风雨后歌词及简谱 东北话破马张飞歌词 ?郅韦?たまり罗马音歌词 会流泪歌词 歌词痴痴mc 歌曲《童年》的歌谱加歌词 歌词痴痴mc 会流泪歌词 永远的蒙古汉语歌词 歌词中带美丽中国的歌曲歌词 爱情转移道歌词 ?郅韦?たまり罗马音歌词 诚信是福许霖歌词 会流泪歌词 英语超级冠军 歌词 阳光总在风雨后歌词及简谱 歌词在分手以前 汪峰我如此爱你歌词原唱 nbmc 歌词 皮皮虾歌词 刘德华潮水汉语歌词 汪峰我如此爱你歌词原唱 歌词《拾忆》 皮皮虾歌词 you liked way歌词 刘德华潮水汉语歌词 我关爱别人的歌词 别再对我说sorry歌词 东北话破马张飞歌词 划船歌西班牙民歌歌词 歌词在分手以前 忘记我自己歌词什么 刘德华潮水汉语歌词 爱情转移道歌词 金志文妹子歌词 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 Fate:DragonVeinWar 异界修真之无上帝尊 传承之泪 综漫:开局鬼灭救堕姬兄妹 掠夺诸天万界的生存之旅 亚星管理平台 澳门葡京官网 葡京官网 亚星管理平台 万利游戏官网 歌词在分手以前 小小戒指歌词 英语超级冠军 歌词 我关爱别人的歌词 孤帆 泛音堂 歌词 划船歌西班牙民歌歌词 东北话破马张飞歌词 海阔天空歌词余家辉 完整版 ?郅韦?たまり罗马音歌词 地下的玫瑰歌词 歌曲《童年》的歌谱加歌词 金志文妹子歌词 皮皮虾歌词 我关爱别人的歌词 歌词痴痴mc 歌曲《童年》的歌谱加歌词 歌词在分手以前 英语超级冠军 歌词 英语超级冠军 歌词 歌词中带美丽中国的歌曲歌词 我关爱别人的歌词 划船歌西班牙民歌歌词 歌词在分手以前 孤帆 泛音堂 歌词 空格的歌词 如果我能改变世界歌词 nbmc 歌词 永远的蒙古汉语歌词 皮皮虾歌词 you liked way歌词