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
苏州吴江到蕲春的汽车荆门到周口的汽车票清湖地铁到龙华汽车站南宁到惠州汽车时刻表信宜到番禺的汽车苏州吴江到蕲春的汽车乳山到高密的汽车清湖地铁到龙华汽车站龙泉汽车总站到地铁站汽车票福建到石阡长沙到中沙汽车票苏州吴江到蕲春的汽车湘阴到长沙汽车站时刻表长沙到中沙汽车票清湖地铁到龙华汽车站汽车票福建到石阡沈阳旅游汽车张家界汽车站几点开始售票张家界汽车站几点开始售票天津到合肥的汽车徐州汽车南站到沛县张家界汽车站几点开始售票龙泉汽车总站到地铁站中山长途汽车站位置信宜到番禺的汽车江门台山汶村汽车站南宁到惠州汽车时刻表前期到定边的汽车五原到呼市汽车湘阴到长沙汽车站时刻表  红色玛瑙似的石头、会唱歌的古木、夜半时分龙的低沉的吼叫、以及阴森的密林中的鬼怪……以及他,瘦弱的读书之人,却为何要爱上了一位美艳多情的少女,非常不幸地使自己卷进了万劫不复的纷争之中……   风高月黑之夜,他来了,沉重似铁的脚步声一度使石头颤抖,天上的月轮见了也不得不向他点头哈腰。他是真正的强盗,雄伟的身躯,过人的胆魄,尚且还有狡猾的头脑。杀人无数的他略显苍老,却并没有忘记儿女情长,风花雪月的日子使人不变老。他是少女的梦,少女还有另外一个梦,便是那读书人的眼眸,那是何等清澈的泉水般的眸子啊。狭路相逢,一头是那读书人,一头是强盗低沉的怒吼,刀抽出来了,上面残留着映着月轮的寒冷的血…… 这便是玄域之地,离奇可怕之事所在多有,天空一度呈现不祥之色,红色的雨飘洒在苍老的大地如雪花飞舞…… 人们纷纷逃离,而那位读书人却不能,因为他得保护着那位少女……      最后,读书人发现少女竟然… 一个平平淡淡酷爱小说的人,不善与人交流。只有小说才是他的世界。不是说报恩最好的方式就是以身相许么?为什么当他想用这种方式报恩时,却被对方嫌弃到不行?是因为自己不够美吗?好,那他就长成一个比倾国倾城的大美女还要美的绝世美人后再来找他,看他还有什么借口拒绝!天下风云出我辈,一入江湖岁月摧。皇图霸业谈笑中,不胜人生一场醉。 起神剑,斩断这天下纷争,荡平这贼寇乱党,还天下苍生一个太平盛世! 但这权位,不屑拥有之。 愿携手红颜,笑傲江湖!为《全民星》系列第四部曲:前三章分别为《全民星:星杰塔》《全民星:世界泡》《全民星:粉丝风波》为多人合作创作作品 内容有较多玩梗,同时并没有绝对龙傲天的人 ,且前三章并未上传到任何网站,仅私下群聊写过,但是这篇的内容已经是第四部了,很多角色在前三章已经无了。虚空的意志选择了伊德温,他将会使用这危险的力量向专制者甚至是神明进行挑战,不死不休,压迫者必将灭亡。“我是谁?我从哪来?我要到哪去?”这亘古不变的问题困扰着少年,他望着海面脑海里一片空白,他失去全部的记忆只留下一具空白的身体,我之前是个什么样的人,是一个冒险家?是一个魔法师?是一个厨师?是一个建筑师?是一个酿酒师?是一个农民?是一个工人?是一个商人?是人人称赞的好人?是坏事做尽的恶人?是平平无奇的市民?无数的疑惑压在少年的心上,幽幽中一个声音传来,“去篱下院吧,那里有你需要的答案。”于是少年踏上寻找自我的旅程,在路上他会遇到什么样的冒险呢?又会遇上什么样的人?404年,大炎被评为最安全的国度,世人最向往的国家。号称没有黑暗与灰暗的阳光之国。   读着手中的报纸,苏景腼腆的笑了。   “其实我也没做什么,不过是人们需要我的时候,做了人人都会做的小事罢了!”   同年,苏景获得和平先锋,世界和平第一人的称号,并被世界地下势力通缉。诸天世界,万神争斗。主角:年休思 无CP 2044年,天降异象,天下大乱,六界融合,各个种族为了争夺生存资源而争斗不休。 人类在生存环境发生巨大变化的情况下,也产生了自我进化,人类之中的一小部分人有了神赐予的能力,被称为神赐。 神明居于天地之外,垂眸看天地干戈,慈悲怜悯终究只是幻想,大道至公,神明不会插手。 天地不仁,以万物为刍狗。 年休思是创世神,不只是人世间,还有天地万物。大道繁衍不休,天地的齿轮旋转,当年风流潇洒的创世神落入人间,经历多少轮回,来到了这个乱世。 终究是命中注定。 年休思生于斯长于斯,将自己在人世间的经历确认为自己的主体意识,偏向于人类,依赖于其自身的实力,最终使天地正位,六界分割,万物和谐,天下大同。
九转还阳剑 大梁镇妖司 高三回忆录 江湖潇湘 重生从摆烂开始 师兄有点飘 全班吊车尾,你告诉我毕业上清北? 毕加索的交流 破劫传说 九域劫主 人道曙光 震惊!我和网红周姐隐婚被曝光了 笑傲之富贵逍遥 九转还阳剑 从高中开始的修福报生活 穿越之朋友我们再认识一遍 惊悚游戏:鬼也得讲道理啊 光明暗裔 九州无敌战神 维克托:起源 诸城到无锡的汽车 江门台山汶村汽车站 南充到沐川汽车 南海九江换汽车座垫哪间好 诸城到无锡的汽车 到宝丰汽车检验去那 苏州吴江到蕲春的汽车 南宁驻马店汽车站时刻表 江门台山汶村汽车站 湘阴到长沙汽车站时刻表 龙泉汽车总站到地铁站 龙泉汽车总站到地铁站 中山长途汽车站位置 汽车票福建到石阡 南充到沐川汽车 信宜到番禺的汽车 广州南站到惠州汽车时刻表 江门台山汶村汽车站 徐州汽车南站到沛县 苏州吴江到蕲春的汽车 到宝丰汽车检验去那 清湖地铁到龙华汽车站 荆门到周口的汽车票 诸城到无锡的汽车 贵阳到长沙汽车时间 中山长途汽车站位置 江门台山汶村汽车站 荆门到周口的汽车票 徐州汽车南站到沛县 江门台山汶村汽车站 张家界汽车站几点开始售票 到宝丰汽车检验去那 南宁到惠州汽车时刻表 苏州吴江到蕲春的汽车 中山长途汽车站位置 信宜到番禺的汽车 秦皇岛站到宝坻站汽车 广州南站到惠州汽车时刻表 中山长途汽车站位置 秦皇岛站到宝坻站汽车 信宜到番禺的汽车 柳赞到唐山汽车时刻表 天津到合肥的汽车 南京南站到仪征汽车票 诸城到无锡的汽车 到宝丰汽车检验去那 龙泉汽车总站到地铁站 南宁到惠州汽车时刻表 五原到呼市汽车 乳山到高密的汽车 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星官网 到另一个世界挨打? 造物主之拯救计划 痴神怒 海棠公园 八符 亚星官网 欧博游戏官网 欧博官网 亚星官网 AG真人 龙泉汽车总站到地铁站 长沙到中沙汽车票 南海九江换汽车座垫哪间好 五原到呼市汽车 荆门到周口的汽车票 南海九江换汽车座垫哪间好 秦皇岛站到宝坻站汽车 徐州汽车南站到沛县 江门台山汶村汽车站 清湖地铁到龙华汽车站 南宁驻马店汽车站时刻表 北流汽车租赁哪个好 中山长途汽车站位置 北流汽车租赁哪个好 长沙到中沙汽车票 乳山到高密的汽车 天津到合肥的汽车 南京南站到仪征汽车票 南充到沐川汽车 长沙到中沙汽车票 清湖地铁到龙华汽车站 南充到沐川汽车 北流汽车租赁哪个好 苏州吴江到蕲春的汽车 信宜到番禺的汽车 柳赞到唐山汽车时刻表 信宜到番禺的汽车 江门台山汶村汽车站 诸城到无锡的汽车 江门台山汶村汽车站