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
医院病历本生成器软件手机模拟吉他的软件免费智能选股手机软件蓝宝石tri xx超频软件什么软件可以找笔友医院病历本生成器软件什么软件可以在pdf上搜索免费智能选股手机软件观看电影软件ipad软件怎么装公共图书馆软件医院病历本生成器软件下载桥架软件公共图书馆软件免费智能选股手机软件ipad软件怎么装微信电脑版哪里下载软件什么软件可以找笔友什么软件可以找笔友解压软件下载32位表格免费什么软件好用bmi记录软件观看电影软件安卓手机手环连接软件给照片p笑脸的软件凯瑞图书软件管理软件蓝宝石tri xx超频软件bkf恢复软件解压软件下载32位钱宝软件聊天没有信息 灾难之后,称为”醒”的新大陆浮出海面。在飓风肆虐,疾病蔓延的残酷环境中,这块大陆做为人类和原生命体的避难所收留着各地的流民与旅人。 为了开拓边境,”醒城“委派“狩界队”奔走境外游猎濒危,稀有以及新生物种用于研究复制和抵抗边境生物。 然而,由于城市动荡,猎物终将做为武器参与各方势力的绞杀……修士风元出生在一个奇幻的修仙世界。在加入了这个世界的大宗派星云宗后,却发现这个世界面临着危机。他能否带领人族对抗强敌,创建辉煌。十年孕养血脉,成为他人祭品,少年古昊觉醒不死吞天诀,逆天崛起! 吞噬无尽星辰,脚踏万族臣服! 枪碎苍穹,龙破乾坤!本书以各个小故事来叙述,类型应有尽有,可以让你哭让你笑,让你体会人生百态叶天,修仙界绝世天骄,修罗战神,却因功高震主,惨死于庆功楼,魂穿来到地球,重生在一个废物大少身上。带着前世的修仙记忆,叶天强势崛起,血战强敌,逆天而行,纵横都市!他来自修仙界,终将破碎虚空而去! 一门被视为垃圾的功法,一个被同门视作废人的修炼狂人,在得到一枚阴阳玉佩之后,一切将彻底改变。 十倍修炼速度,令古飞一再突破武道极限,千百年来已被人认定的铁律,被古飞一一打破! 奇迹……古飞不相信奇迹,他相信的只有血和汗,在这个武道已经没落,真正的武道奥义已经失传的腾龙大陆修炼界,且看古飞如何以武逆天,脚踏道术神通,拳打妖魔鬼怪,怀抱红颜绝色,成就不灭武尊! 梁三的书群:群一:139735153;群二:274673223(空);群:11269273(满)!76376881(未满)!梁三完本作品:《都市之古武风流》!!杨小乐在推销的途中,误入城市一间隐秘的房子,在听到一声秒针的哒哒声之后,脑海里传来一个甜美的女声。 :恭喜宿主成功开启无问系统。。。 从此主角的开挂人生正式开启,拥有了所有平凡人穷极一生也无法拥有的财富,美女,神功; 当他轻而易举的站在了世界的最高处,却看清了这个世界的真相。 :“我命由我不由天,如果天道不公,那我就换了你这老天!” 。。。人在做,天在看,天知、地知,你知,我知!作恶者为非作歹,祸乱人间,躺赚不义之财,妄想游离于法网之外,欺天瞒地,逍遥自在,潇洒快活!殊不知,不是不报时候未到!天网恢恢,疏而不漏!恶者恒恶,善者永善,公道自在人心!出门在外,谨记必带一本《古真经》因为你不知,真(白发女鬼——新疆语)会在哪里,也许会在你的身边。生命是什么?那或是一场奔赴尘世的旅行,每个人都身处荒野,仰望着星空。渺小的一切,终将化为黄土,随风消逝。可一切存在过的,都将成为被传颂的一首赞歌。
异能者1:歼灭世界的阴谋 篮坛群侠传 牢笼世界之不死天功传承者 三界焚尊 白不凡 世界级魔王的复苏日记 苏联之北 我必吞天 浮屠阁笙世 我让你开店你在末世当财迷 隐匿而伟大 我竟是一条狗! 轮回相杀 芊芊姐的千千劫 回归悲凉 睫毛的闭合 洛神赋英雄千金女 阖箍 卦灵路 地表最强高手 凯瑞图书软件管理软件 ipad软件怎么装 微信电脑版哪里下载软件 什么软件可以找笔友 手机模拟吉他的软件 bkf恢复软件 有什么把视频压缩小的软件 手机自学吉他软件中文 免费软件ipad 下载桥架软件 西装工作照软件 西装工作照软件 安卓手机手环连接软件 ipad软件怎么装 医院病历本生成器软件 给照片p笑脸的软件 vcd文件如何刻录软件 凯瑞图书软件管理软件 专门用于走步 的软件 免费智能选股手机软件 软件查看2017qq聊天记录 免费智能选股手机软件 专门用于走步 的软件 bmi记录软件 winrar压缩软件去广告 电话录音的软件有哪些 凯瑞图书软件管理软件 专门用于走步 的软件 表格免费什么软件好用 凯瑞图书软件管理软件 什么软件可以找笔友 软件查看2017qq聊天记录 蓝宝石tri xx超频软件 医院病历本生成器软件 安卓手机手环连接软件 给照片p笑脸的软件 蓝宝石tri xx超频软件 有什么把视频压缩小的软件 安卓手机手环连接软件 苹果wps软件 给照片p笑脸的软件 手机自学吉他软件中文 解压软件下载32位 vcd文件如何刻录软件 公共图书馆软件 软件查看2017qq聊天记录 西装工作照软件 给照片p笑脸的软件 电话录音的软件有哪些 微信电脑版哪里下载软件 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 东帝国 复仇少年的逆天赞歌 宇宙外挂专家 龙头沟风云录 重生异虫女王,回到2020 亚星官网 万利官网 欧博游戏官网 亚星官网 AG真人 bkf恢复软件 软件查看2017qq聊天记录 vcd文件如何刻录软件 观看电影软件 西装工作照软件 winrar压缩软件去广告 微信体现软件 蓝宝石tri xx超频软件 手机自学吉他软件中文 钱宝软件聊天没有信息 手机自学吉他软件中文 bkf恢复软件 下载桥架软件 有什么把视频压缩小的软件 凯瑞图书软件管理软件 软件查看2017qq聊天记录 什么软件可以找笔友 手机模拟吉他的软件 免费智能选股手机软件 蓝宝石tri xx超频软件 苹果wps软件 免费软件ipad 钱宝软件聊天没有信息 vcd文件如何刻录软件 蓝宝石tri xx超频软件 电话录音的软件有哪些 bkf恢复软件 ipad软件怎么装 安卓手机手环连接软件 医院病历本生成器软件