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
帝都异事录txt抗日之不死传说txt大岛主txt赵德昭txtfbi教你读心术 txt寻龙诀txt我的美女娇妻txt下载大岛主txt国医大师txt清宫升级记txt潘多拉魔盒txt下载帝都异事录txt闯关东txt下载金庸绝学异世横行txt下载大岛主txt清宫升级记txt无限作死txt全集下载杨家将之风流八少txt杨家将之风流八少txt红色权力 txt下载烈明txt下载杨家将之风流八少txt国医大师txt鬼妻txtfbi教你读心术 txt立隋 txt赵德昭txt鬼妻txt53种离别txt下载闯关东txt下载XX年间,天下大乱,群妖四起,官兵横行,百姓民不聊生。 天上众神,心疼百姓,特派紫微星下界,斩妖除魔,匡扶正义,救黎明于水火。 紫微星领命,下到人间,化身一名女子,隐居山间,观察人间百态,看遍民间疾苦,可悲可叹!一个宅男穿越到日本战国时代,逢凶化险,不断适应成长的历险故事。一个普通人,在游戏里的一次欧皇爆发,拿到全区唯一的特殊技能。赶上游戏版本大更新,职业选手纷纷进场,搅动风云。某日,陈不建忽然发现,自己不知不觉的,成为了游戏旋涡的中心。 剑圣:“听说特殊技能在你手上,与我切磋一把,如何?”陈不建无奈:“我说特殊技能不在我手上,你信嘛?” “不信。” …… 仰望诸天星辰,盯着那二十八星宿所在,瞥眼看向眼前的大BOSS,陈不建忽然自问:“我玩个游戏需要懂五行,知晓奇门八卦,还给知道医理解毒,懂完这些我还给知道天上的星宿,我也是奇了怪了,我这是玩游戏呢还是修仙呢?林原刚刚穿越就碰到一只想要吃掉自己的恶鬼该怎么办?当然是掏出武器打爆对方了!可要是打不过又怎么办?那就只有动用自己的天赋(外挂) 了。“修改器!给我点,!日之呼吸精通!通透世界完成!斑纹开启!赫刀就绪!给你们一分钟的时间逃跑,不然的话,等待你们的就只有死亡。[老八秘小制]清末,列强纷纷侵入中国,他们在中国领土上横行霸道,任意划分势力范围,中国民族危机日益加深,百姓生活在水深火热之中。伴随列强入侵的西方传教士打着传播福音的旗号,勾结官府,鱼肉百姓,招收了大量不法教民。在其庇护下,教民为非作歹,欺压良善,激起民众的普遍痛恨,民教冲突不断升级,以“扶清灭洋”为口号的义和团悄然兴起。戊戌政变后,保守派得势,他们迷信义和团刀枪不入的神功,欲借其达到排外的目的,在保守派的纵容和推动下,义和团迅速发展壮大,他们毁铁路、拔电杆、烧教堂、杀教民,逐步由山东直隶进入京师。列强大为恐慌,以保卫使馆和传教士为由,组建八国联军攻陷北京,慈禧太后携皇亲国戚仓皇西逃,留下千年古都被洋人蹂躏……一定会有一种方法,得到真相,一定会有一条路,可以通向自在,如果怎么也找不到,那我就打出一条通天路! ——陈因恨王侯将相,宁有种乎? 泱泱大晋,达官显赫,人才无数。 但我罗明秋亦能以蝼蚁出身,搅动风云。 文官之首:“燕雀安知鸿鹄之志哉?吾亦不知罗明秋!” 镇国将军:“这一扎子读书人中,某最服的就是罗侯爷。” 真龙:“这龙椅,明秋君比我更合适!” 皇后:“与君相见恨晚,若不然,这后宫之主不当也罢……” 且看一介书生,如何拨弄这天下棋盘…… 讲述了我自己的真实故事,希望大家喜欢文凭输了,家境输了,颜值输了,只剩下那一文不值的自尊心和被现实不断冲击的三观与道德底线。本书以北欧神话为故事创作参考。故事背景是在科技水平高度发达的人类未来社会,之中以神与恶神与巨人的冲突为故事情节推动,旨在凸显远古文明与未来文明的碰撞下给人类的启示。故事涵盖高科技,星际航程,地外文明以及星际战争等。
克利西亚 穿成神兽饕餮,被软萌校花召唤了 星辰破千里 剑魂帝国 我有火之传承 夕阳下的拾荒者 御兽:我的分身是玄武 诸天之铁匠也疯狂 破天机系列之残马渡阴兵 合成纪元 方块一生 兴安岭日记 洪荒:家兄冥河,我稳健成圣! 人类往事:启航 足球引路人 风起少年郎 渡劫飞升 傲世,修罗神 争天帝战 100根香烟 sc之彼岸花txt下载 死亡街机厅txt下载 无限作死txt全集下载 杨家将之风流八少txt sc之彼岸花txt下载 蝶十二的三妻四妾txt 天才医生txt全集免费下载 逃婚总裁txt 立隋 txt 闯关东txt下载 国医大师txt 武镇星河txt 侍卫大人娶我好吗txt 清宫升级记txt 寻龙诀txt fbi教你读心术 txt 天才医生txt全集免费下载 立隋 txt 烈明txt下载 帝都异事录txt 死亡街机厅txt下载 大岛主txt 抗日之不死传说txt 金庸绝学异世横行txt下载 清宫升级记txt 侍卫大人娶我好吗txt 立隋 txt 抗日之不死传说txt 烈明txt下载 立隋 txt fbi教你读心术 txt 死亡街机厅txt下载 明明动了情txt 帝都异事录txt 鬼妻txt fbi教你读心术 txt 明明动了情txt 无限作死txt全集下载 侍卫大人娶我好吗txt 大岛主txt 赵德昭txt 解放战争txt下载 红色权力 txt下载 武镇星河txt 金庸绝学异世横行txt下载 死亡街机厅txt下载 武镇星河txt 赵德昭txt 53种离别txt下载 我的美女娇妻txt下载 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 上帝禁区之第七空间 侠客仗剑守国门 少年时之九零后 玄幻之我是半个大师 弑天炼神 亚星管理平台 澳门葡京官网 AG真人 亚星管理平台 万利官网 抗日之不死传说txt 腹黑相公的庶女宠妻txt下载 大岛主txt 杨家将之风流八少txt sc之彼岸花txt下载 无限作死txt全集下载 我的美女娇妻txt下载 53种离别txt下载 无限作死txt全集下载 国医大师txt 侍卫大人娶我好吗txt 陶庵梦忆 txt 死亡街机厅txt下载 抗日之不死传说txt 帝都异事录txt 明明动了情txt 大岛主txt 立隋 txt 闯关东txt下载 蝶十二的三妻四妾txt 明明动了情txt 侍卫大人娶我好吗txt 蝶十二的三妻四妾txt 潘多拉魔盒txt下载 鬼妻txt 红色权力 txt下载 金庸绝学异世横行txt下载 寻龙诀txt 国医大师txt 大岛主txt