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下载洪荒道玄txt暗恋箫郎txt下载异种修真记txt下载姓名大全 txt拽丫头惹上酷总裁txt下载重生之暗夜尤物txt东汉开国全集txt灭敌妖魂txt异种修真记txt下载族长的秋天 txt下载灭敌妖魂txt拽丫头惹上酷总裁txt下载残唐五代史演义txt下载大国崛起全集txt下载暗恋箫郎txt下载暗恋箫郎txt下载浙大夜惊魂txt下载奋斗txt黑太子的玩物txt重生之暗夜尤物txt五年情牵:宝宝73天后txt下载军婚娇扯txt下载大清拆迁工txt洪荒道玄txt大秦帝国第六部txt浙大夜惊魂txt下载美人如玉之小玉妃txt下载生逢唐末乱世,各地豪强并起。看我江陵少年,如何渐露锋芒,尽显英雄气概。太和天帝的谎言被揭穿,太阴幽荧被重创后逃至下界成为东郭墨韵的伴生灵。这天界到底是什么地方?天行健君子以自强不息,地势坤君子以厚德载物,本欲碌碌一生,奈何世事无常,是向前披荆斩棘,还是任人鱼肉,且看主角在红尘滚滚中如何取舍,亲情,友情,爱情 恩义,众生百态,如何面对,新世界如何创造,旧规则怎么修改,红尘路远,行者无疆 小说情节纯属虚构,如有雷同,请多谅解为寻求真相,潇漓开始踏足江湖,不想因此揭开一段被掩埋了二十多年的真相,而那正是潇漓所要寻找的…叶鑫是一名普通高中生,某天发现自己被惊悚副本选中。   副本只有4.3%存活率。   凉凉!无助!   叶鑫绝望时觉醒了人鬼皇系统:他能看破鬼怪生前!他能看见好感度!他还能使用鬼怪的武器!   从此以后,骚鬼如风,常伴吾身。谁说修仙一定是人,谁说冷血不适合修仙,白蛇凭刻苦努力不断升级修炼一个退伍的特种兵生意正做得红火的时候,一场流行病袭来死在重病房,穿越到宝玉身上。但是这个宝玉却是在实实在在的清朝康熙初年,且看他如何玩转贾府,如何与黛玉、宝钗发生最让人惊叹的爱情;如何与秦淮八艳共进退;如何揭开康熙的神秘身份,如何解开清朝最大秘辛,如何成为最大的“造反大头目”,最后黄袍加身,成为新的“大汉国”开国“总统帅”!一觉醒来,这个世界再也不是熟悉的那个车水马龙的样子,纷乱的战火,各色的超能力,这是干嘛啊!觉醒了SSS级别的超能力,我是奶妈?不,我这是圣职者,惩戒与祝福才是我的专长,那个劳什子治疗,只是我附带的能力罢了!在海盐家雾城的两人,刘羽和柳青潇一直在调查小时候的灾难的实情,一次执行任务的途中,柳青潇失忆,智商也只是小孩的程度,却在找回记忆的途中发掘出了真相天地皆有意志。帝国之皇,号为天子,秉承天意,受上天之意庇护,代天意牧守天下,统治万民。人族共主,号为人王,传承地道,受大地之意庇佑,代地意统合宇内,拯救万民。当帝国腐朽,民不聊生,人王当即崛起,扫清四野,震慑宇内,救万民于水火。当人王暴虐,生灵涂炭,天子适时而立,统一八荒,威加天下,还百姓以清明。如此往复,周而复始。其,实则天地之争。天子当立之时,必取地道传承之伏家。人王崛起,必破天意传承之天家。伏家有一脉,号地道行者。修《地道十六方》。天家有一友,号天机散人,修《天机十八策》。二脉之争,始于天地初生,已历九万多载。九为数之极致,天地之争,便会终于当代。秦天,天家少主。出生之时,即是天家覆灭之际。在当代天机散人带领下,隐姓埋名。及至秦天十四岁,当代的天地之争,便拉开帷幕。
星宇辰主 测试签约bug111 猛鬼大厦 鬼怨校园:噩梦 我真的不是绝世高人啊 请问逆袭犯罪吗? 老婆,我真是一个凡人! 神探5118 直播练武:这个主播居然玩真的? 虚实元宇宙 后虚降新星 黑白城之六城废墟 病态与绝望 我在大明当皇帝 不再正常的世界 大话西游之如来密码 囚徒日记之飘零燕 劫后余声 丧尸危机:我重生在末日 我的网文日记 大清拆迁工txt 残唐五代史演义txt下载 大国崛起全集txt下载 暗恋箫郎txt下载 大清风水师txt下载 大秦帝国第六部txt 官居一品 txt下载 红色王座 txt 宁航一夜话txt 族长的秋天 txt下载 琉璃般若花txt 琉璃般若花txt 五年情牵:宝宝73天后txt下载 残唐五代史演义txt下载 异种修真记txt下载 军婚娇扯txt下载 逆天废后txt下载全本 大清拆迁工txt 太子妃请乖乖就擒txt 拽丫头惹上酷总裁txt下载 大宋权臣txt 拽丫头惹上酷总裁txt下载 太子妃请乖乖就擒txt 黑太子的玩物txt 东汉开国全集txt 扩张之路txt 大清拆迁工txt 太子妃请乖乖就擒txt 奋斗txt 宁航一夜话txt 暗恋箫郎txt下载 大宋权臣txt 洪荒道玄txt 异种修真记txt下载 五年情牵:宝宝73天后txt下载 军婚娇扯txt下载 洪荒道玄txt 官居一品 txt下载 五年情牵:宝宝73天后txt下载 丛林猛兽txt 军婚娇扯txt下载 红色王座 txt 浙大夜惊魂txt下载 逆天废后txt下载全本 灭敌妖魂txt 大宋权臣txt 琉璃般若花txt 军婚娇扯txt下载 扩张之路txt 大国崛起全集txt下载 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 末日骰子 紫薇真经之内经篇 绝世联盟 江湖:无奈扮虎吃猪 兆古一帝 葡京官网 快连下载 欧博游戏官网 亚星官网 AG真人 大秦帝国第六部txt 大宋权臣txt 逆天废后txt下载全本 重生之暗夜尤物txt 琉璃般若花txt 东汉开国全集txt 雍正皇帝 雕弓天狼 txt 洪荒道玄txt 红色王座 txt 美人如玉之小玉妃txt下载 红色王座 txt 大秦帝国第六部txt 族长的秋天 txt下载 官居一品 txt下载 大清拆迁工txt 大宋权臣txt 暗恋箫郎txt下载 琉璃般若花txt 扩张之路txt 异种修真记txt下载 雍正皇帝 雕弓天狼 txt 太子妃请乖乖就擒txt 残唐五代史演义txt下载 美人如玉之小玉妃txt下载 异种修真记txt下载 大清拆迁工txt 太子妃请乖乖就擒txt 暗恋箫郎txt下载 大清拆迁工txt 五年情牵:宝宝73天后txt下载