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
3366小游戏芭比119消防车灭火游戏大全3366小游戏芭比换装3366小游戏怪兽大破坏3366小游戏火车类3366小游戏9999小游戏1941手机游戏3366小游戏芭比换装10月连连看游戏大赛33小游戏:3399小游戏大全大全3366小游戏芭比33小游戏有冲浪3399小游戏大全捕鱼3366小游戏芭比换装33小游戏:1984飞机游戏3366小游戏美女餐厅3366小游戏美女餐厅3366钢琴小游戏大全免费下载11584小游戏动漫女孩3366小游戏美女餐厅10月连连看游戏大赛17yy中文版小游戏大全3366小游戏火车类16岁儿童玩的游戏下载3366小游戏怪兽大破坏17yy中文版小游戏大全3366钢琴小游戏大全33小游戏有冲浪论剑道,他已剑意凝魂;论天资,他解人魔不和之体;论实力,他一人一剑一法一道杀尽世间之敌; 人魔共体的他被人魔所弃,魔族高贵的魔族公主,桀骜的人族太子,他又将何去何从……绝望与救赎依偎,死亡与生机共线 人类与厉鬼共舞,善良与邪恶共眠 唯有灵异诅咒,方可对抗恶鬼 人世颠倒,白天黑夜迅疾而过,仙人一语长生,万物奔赴。人间就像是一个巨大无比的茧,使万物困于其中纠缠不清。盛世来临,是谁揭开人间的轻纱,使得苦难与阴谋汹涌诡谲。而此刻从山巅跌落谷底的柳山林是不是渴望着能够生长出翅膀,期盼着于某一日破茧而出,得到救赎。上天界武魁之尊,为人所害,转生下界。 修神诀,斩敌首,一刀一剑,誓要杀回诸天上界! 至此,傲笑天地,镇压万圣,掌控寰宇,不朽不灭!都说商场如战场,可是有多少人知道期货市场是战场上刺刀见红的前沿阵地? 人生就像k线图,有阴线,也有阳线。 是怎样的人生经历,让男主角发出了“向左看,一目了然;向右看,一片茫然!”的感慨? 请走进这部小说,走进书中人物的内心世界,一窥主人公在漫山遍野芬芳中的情感历程,回望期货市场波诡云谲的变化,体会一飞冲天的快乐,也品尝泥沙俱下的痛楚。 本故事人物﹑情节均为虚构,若有雷同,纯属巧合。少年成长之途,这路,通往未来的荣光,也连接了旁人的过往…… 九州大陆,万国林立。   赢云穿越大秦,成为始皇第九子,并获得了咸鱼系统,只要咸鱼,就可以持续不断的获得奖励。   于是,   赢云直接咸鱼起来,默默签到,不仅获得了无数奖励,还顺利突破,成了九州唯一一尊陆地神仙!   ……   有一日,   天降金榜,盘点最强生灵。   只见,   大漠之中,赢云一剑开天门,入陆地神仙,屠数十万军,举世震惊!   帝释天:“什么?这世界上还有比我更强的人?!”   孤独求败:“杀尽仇寇,败尽英雄,平求一敌手而不可得!这赢云,值得一战!”   ……   紧接着,   天道神兵榜、天军榜等相继曝光。   神兵榜第一,圣剑轩辕,属大秦九皇子赢云!   天军榜第一,大雪龙骑,属大秦九皇子赢云!   ……   嬴政:“这是朕那咸鱼儿子?!”   ……未来世界,一款名为超神空间的游戏横空出世! 人类可以自由进入超神空间,进行修炼升级打宝炼器,并且能在虚拟和现实中自由穿梭,将游戏中的等级和宝物带回现实! 沈明为了救治母亲的癌症,踏入超神空间寻找药物,逐渐从一个人人喊打的小人物,成长成为天下无双的万界之主! 讲述了一个少年穿越异世界当冒险王的故事,成长的旅途中结识了不少的朋友,有开心的冒险,有不迷失方向前进的勇气,为了梦想寻找托贝尔斯特神迹, 2155年,大战之后的一百多年,地球上一片疮痍,人们依旧生活在物资匮乏的世界之中,此时,由地球联合政府授意,一款由中文meta公司开发的元宇宙游戏《天下》即将上线,这是一款号称人类“第二世界”的游戏,在这款游戏里你可以获得一切,金钱、物资、武器、地位,应有尽有。 少年林昭,一个意外成为植物人的贫民区机车少年,偶尔获得了游戏里的一个内测机会,是否能改变命运,重启新的人生? …… 这款《天下》游戏的故事背景空前强大,融合了各大爆款IP,《修罗武神》《万古第一神》《九星霸体诀》《超级兵王》……你可以在中文IP宇宙里体验各种奇异的世界,不同的人生! 本书又名《剑仙元宇宙》!
冰峰奇缘 从预备级除灵部队开始 我在末日中横行 山海之诡异修仙录 赋闲贵人 仙班册 假装破产后,老婆跟别人跑了 江山弈 全球映射:开局斩杀地狱战神 异界修仙之无上帝尊 雷落里希 盘龙斗 四维空间之世界末日 魔女图鉴 谁是少年,谁不狂 我身独仙 龙绝天绝 我只想毁灭世界的啊 乱灵纪 身为勇者竟然爱上了魔王 16岁儿童玩的游戏视频 3399小游戏双人闯关 1984飞机游戏 3366小游戏美女餐厅 16岁儿童玩的游戏视频 17yy中文版小游戏 369小游戏试玩 33小游戏小游戏 16岁儿童玩的游戏下载 33小游戏有冲浪 10月连连看游戏大赛 10人团队闯关小游戏 3366芭比小游戏大全免费下载 33小游戏: 3366小游戏9999小游戏 3366小游戏火车类 369小游戏试玩 16岁儿童玩的游戏下载 11584小游戏动漫女孩 3366小游戏芭比 3399小游戏双人闯关 3366小游戏芭比换装 119消防车灭火游戏大全 3399小游戏大全捕鱼 33小游戏: 3366芭比小游戏大全免费下载 16岁儿童玩的游戏下载 119消防车灭火游戏大全 11584小游戏动漫女孩 16岁儿童玩的游戏下载 3366小游戏火车类 3399小游戏双人闯关 3366小游戏大全双人女生 3366小游戏芭比 17yy中文版小游戏大全 3366小游戏火车类 3366小游戏大全双人女生 1984飞机游戏 3366芭比小游戏大全免费下载 3366小游戏芭比换装 3366小游戏怪兽大破坏 33小游戏小游戏大全 3366钢琴小游戏大全免费下载 10人团队闯关小游戏 3399小游戏大全捕鱼 3399小游戏双人闯关 10人团队闯关小游戏 3366小游戏怪兽大破坏 3366钢琴小游戏大全 1941手机游戏 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 叶富贵的世界 逍遥的呀,小神仙 武纵天途 卡米斯大陆编年史 梦长城 亚星官网 万利官网 欧博官网 亚星官网 AG真人 16岁儿童玩的游戏视频 16岁儿童玩的游戏下载 3366钢琴小游戏大全免费下载 3366小游戏芭比 3366小游戏美女餐厅 369小游戏试玩 119消防车灭火游戏大全 33小游戏小游戏大全 10月连连看游戏大赛 3399小游戏双人闯关 16岁儿童玩的游戏下载 1941手机游戏 3366小游戏芭比 3366小游戏芭比 17yy中文版小游戏大全 3366芭比小游戏大全免费下载 119消防车灭火游戏大全 16岁儿童玩的游戏下载 11584小游戏大 3366小游戏9999小游戏 3366小游戏火车类 1984飞机游戏 119消防车灭火游戏大全 3366小游戏大全双人女生 10人团队闯关小游戏 33小游戏: 17yy中文版小游戏 369小游戏试玩 3366小游戏大全双人女生 3366小游戏芭比换装