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
模糊头像2017个性励志文艺网名女生头像女生模糊头像2017二次元头像一张双人小希头像公主图片大全可爱图片头像女学生全身霸气两张小孩情侣头像头像女 模糊高清头像欧美男帅哥qq头像图片大全集微信头像K模糊头像2017单身狗男生动漫头像有狗狗的动漫女生头像头像女 模糊帅哥qq头像图片大全集硬汉头像 军人头像制作带字素材图片头像制作带字素材图片qq宇头像带字黑白女纹身头像霸气十足头像制作带字素材图片高清头像欧美男好看qq头像漫画人物头像小希头像公主图片大全可爱图片个性网社会动漫头像二次元头像一张双人好看qq头像漫画人物头像qq宇头像带字单身狗男生动漫头像东土国沿海的一户贫困人家的女儿蔡钟生与海鲜门店老板的儿子柳三军早恋生子,后来阴错阳差迁往内地生活,因劣根深厚,频频造孽,死后轮回转世为猴、鸡、蟑螂等多种禽兽虫豸偿还宿债。 继而再次转世变成鸽子,被主人训为信鸽,在一次战役中送信,使成千上万的老百姓逃离出来而保全生命。在送信途中,不幸被猛禽猎杀而魂归地府,阎王见它有功,赐它转生人身,成为一个爱唱歌的女人。 五百年后,又经过多世的轮回,先后变蝉、丹顶鹤和专为穷人治病的医生,由于素行善举,广积阴德,至上寿而殁。 又一世,他生在一个钱姓居士家里,取名济世。幼习佛经,后出家住庙修行,积极倡导护生放生,正值高龄,他把寺庙收拾得非常干净。一天,他跏趺而坐双手合十,脸带微笑。忽然凌空一声巨响,众人掩耳下视,发现老僧的打坐过的位置什么也没有,只留下毛发和指甲;再抬头看时,天上出现一道彩虹。有人高兴地叫道:钱和尚虹化了。 震惊,穿越异世界之后我和好兄弟竟成了“cp”?携手打怪升级却屡屡遭遇爆笑窘境 ,哥们,这究竟是什么鬼地方啊我想回家!!医者仁心 仁者无敌 (PS:本故事纯属虚构,如有雷同,纯属巧合)秋风萧瑟,落叶纷飞。 凌城的正中央立着一块墓碑,与众不同的是,这一块碑上,刻着多个人的名字。鲜艳的红色夺目耀眼,在秋阳的照耀下,显得熠熠生辉…… 昏暗的正厅里,坐着一位白发苍苍的老人,颤颤巍巍的手一遍遍的翻着一本早已模糊的相册,还有几张已泛黄的信。泪,无声的落了下来,滴在了信纸上…… “咚咚咚”耳边传来敲门声,门开了,一个小姑娘探进了头。 她笑了笑,挥挥手让小姑娘进来坐下。 “墨奶奶,我可以听你讲讲你以前的事吗?今天在广场上,妈妈念了一些名字我听你说过。你和他们有什么关系吗?” 她点了点头,尘封已久的回忆又浮现脑中,她开始讲述,那仿佛已多少世纪的事情…… 隐隐约约,她仿佛又听到了那句话: “小栖,别哭,好好地,活下去……” 这,是寒烨的故事,亦是阙安的故事四国并起,正邪对立,上古世界虽然过去,但少年武灵已然被其拣选,他将改变人们心中的成见。 谁说出身于平凡的人不能崛起? 谁说身处逆境中的人不能觉醒? 他将诠释武道的作用之大。 他既是护国之手,同时也是使命行者。 究竟是邪恶的冥界先将正义吞灭,还是以他为首的正义重铸天地秩序?前世身为妖婆大弟子享受一切修仙资源,因飞升未成受三世凄惨轮回,老妖婆子逆天改命寻找转世宿主,我的人生开始转变,一切的一切他都不放在眼里,只为夺回属于他的所有回到老妖婆子身边。股市,是上帝留存在世间的最后一个伊甸园。 这个伊甸园,是圣人的天堂,凡人的地狱。 不管是圣人又或者是凡人,都被贪婪与恐惧所支配着。 稍不留神,便可能马失前蹄。 是驰骋在天堂里超凡入圣,还是在地狱里摸爬滚打,所有干系。 都寄于…… 指尖之上。没有命运,仅有人铺垫出之坎坷道途 没有净土,仅有人开凿出之世外桃园 - 一把王者圣剑,为黑夜带来光明 一个不屈英魂,为世间燃点希望 - 觉醒灵魂,少年鏖战神魔; 暗云涌动,泛起灭世争端! - 光暗冲突,大战一触即发; 人神决战,再写创世诗篇!又名绝剑天下 双晶大陆上的神秘组织 神奇星球上的残酷战争 少年身怀绝技 书写磅礴传奇印象里,我好像有一个弟弟。我很小的时候父亲带着他消失了,那个时候我七岁,到现在怎么也想不起弟弟的样子,我甚至会怀疑,这个弟弟,会不会是我闲来无事现象出来的玩伴 嗯……作者新人,喜欢写一点奇奇怪怪的东西,可能还没有逻辑,就……咱们文明评论
蚁道 天地末判其名 犯罪典录 风之子于归 九天破灵 九阳医神 废土之上! 新生之力 你好,时间 史上最强创业系统 诡谈撰 万域为神 魔幻西游释厄记 女总裁的全能兵王 异武新大陆 向光而生,我欲戴冠 我只想平平淡淡过生活 变强从屠龙开始 太阳的反面也温暖 无敌枪域 拿手机的情侣头像唯美 可爱头像动漫带耳朵 硬汉头像 军人 头像制作带字素材图片 拿手机的情侣头像唯美 品牌头像图片 头像一个男的亲吻桃花 萌妹子头像有耳朵q版 个性网社会动漫头像 单身狗男生动漫头像 高清头像欧美男 赵丽颖闺蜜头像一对两张 卡通照片头像 吵架 可爱头像动漫带耳朵 头像女学生全身 小希头像公主图片大全可爱图片 头像一个男的亲吻桃花 个性网社会动漫头像 黑白女纹身头像霸气十足 模糊头像2017 可爱头像动漫带耳朵 头像女 模糊 个性励志文艺网名女生头像女生 有狗狗的动漫女生头像 帅哥qq头像图片大全集 卡通照片头像 吵架 个性网社会动漫头像 个性励志文艺网名女生头像女生 黑白女纹身头像霸气十足 个性网社会动漫头像 小希头像公主图片大全可爱图片 可爱头像动漫带耳朵 鸟儿动漫头像大全集 模糊头像2017 好看qq头像漫画人物头像 小希头像公主图片大全可爱图片 鸟儿动漫头像大全集 硬汉头像 军人 卡通照片头像 吵架 头像女 模糊 二次元头像一张双人 小朋友的西装头像图片大全 漂亮的猪猪头像图片大全 赵丽颖闺蜜头像一对两张 有狗狗的动漫女生头像 可爱头像动漫带耳朵 赵丽颖闺蜜头像一对两张 二次元头像一张双人 qq宇头像带字 霸气两张小孩情侣头像 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 神医灵王闯校园 孤道求索 灵械至上 江山图:穿越后周 龙之谷英雄 欧博游戏官网 百家乐官网 亚星管理平台 欧博游戏官网 亚星管理平台 品牌头像图片 拿手机的情侣头像唯美 头像制作带字素材图片 个性网社会动漫头像 卡通照片头像 吵架 小希头像公主图片大全可爱图片 qq宇头像带字 品牌头像图片 头像女学生全身 头像一个男的亲吻桃花 萌妹子头像有耳朵q版 赵丽颖闺蜜头像一对两张 头像女 模糊 漂亮的猪猪头像图片大全 鸟儿动漫头像大全集 萌妹子头像有耳朵q版 小希头像公主图片大全可爱图片 鸟儿动漫头像大全集 个性网社会动漫头像 二次元头像一张双人 微信头像K 霸气两张小孩情侣头像 微信头像K 小希头像公主图片大全可爱图片 帅哥qq头像图片大全集 卡通照片头像 吵架 头像女学生全身 qq宇头像带字 单身狗男生动漫头像 可爱头像动漫带耳朵