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
西渡到娄底汽车站凤凰到源陵的汽车列表曲阜日照汽车价格表丽水到乐山有没有汽车票南昌到黄山的汽车西渡到娄底汽车站泽国到利川汽车曲阜日照汽车价格表颍上汽车站站台有几路方城到亳州汽车电话安丘到即墨汽车西渡到娄底汽车站定州到唐山滦南汽车时刻表安丘到即墨汽车曲阜日照汽车价格表方城到亳州汽车电话龙华到芳村汽车站时刻表南昌到黄山的汽车南昌到黄山的汽车白湖亭有到长乐的汽车站洛阳汽车站克服电话广州汽车站到白云机场颍上汽车站站台有几路汝州汽车站服务电话嘉兴汽车北站下班时间贵阳到重庆汽车那个站丽水到乐山有没有汽车票临汾到临海的长途汽车白湖亭有到长乐的汽车站吉首至龙山的汽车时刻表当压抑串联起阵阵悲伤,当眼神失去了一丝丝希望。 少年坐着做了一个梦,他梦见他们面朝大海;他梦见海边春暖花开;他梦见阳光刺穿黑暗;他梦见她对他充满期待……秦王政二十六年,林枫穿越大秦,成了咸阳城中籍籍无名的客栈老板,系统觉醒,签到奖励却十分鸡肋,这让林枫很是苦恼。 觉醒签到系统商人老郑倒是经常光顾生意冷清的客栈,只是每次都要询问国家理政大事或是治国之道,还要学习五禽戏。 “请先生教我五禽戏。” “请先生教我如何抵御匈奴。” “先生觉得哪位皇子适合继承大统?” 林枫虽觉得问题越来越古怪,却还是看在丰厚报酬的情况下详细解答。 直到系统升级,要想获得更好奖励需要入朝为官,林枫正为此发愁之时。 老郑却笑吟吟地告诉林枫:“小子,不装了,我是大秦祖龙!”这本书是基于设定的新的修炼体系,与主流修炼体系有所差异的一个新的尝试,想要寻找突破。破穴,单穴破,双穴破,奇穴现,人族崛起谁能左拥天下,右抱爱情,笑看风云数千载?太阳神?佛祖?朱雀?光神?青龙?水神?玄武?白虎?谁主宰风云数千载!我是一个老千,为了报仇,我坐上赌桌,以千术把仇人踢进赌博的深渊。老千生涯,靠赌为生。三教九流,江湖百态。 赌桌上,没有常胜将军,输一次,万劫不复。一个理科大学生意外灵魂穿越来到异界大陆,重生在战场之中。这是一个以玄气修炼为尊的玄之大陆,他历经磨难却百折不挠,从小小的玄者到一方霸主的玄王,他的每一步都异常的艰险,精彩人生,从穿越异界开始。大家好我是世家独一,阴阳界这部作品是我写的一本小说,由于时间比较富裕,现在语音播讲也是我自己在播,阴阳卷一共十二卷,这部叫阴阳界之仇仙。 简介 阴阳界,一个存在即是合理的地方,因为城隍力量薄弱,强大的阴魂精怪建立的狂欢乐园,横死之人死后会不由自主的被阴阳界吸引,这里就是精怪阴魂的游乐场。风水法器世家岳家长孙岳清山,阴阳杂家吕齐官(地府五官王转世),虎(护)族修罗兄弟(异卵双生),净土宗大尊关门弟子明觉行者(净土宗世间行走),五人组成玄学天团,闯荡阴阳界,梳理华夏龙脉,一扫阴阳界混乱。 (阴阳界首卷,也是起始卷,名字“仇仙”) ps:每天一章,不会多更,如无意外阴阳界600万字起,终生系列,每卷单发单本。 书友群号:阴阳界之仇仙 76922085顾潇一次意外穿越到了500年后,获得了没有名字的系统,可以通过抽奖、签到、做事,获得奖励,并且能量值可以兑换很多物品,更为逆天的是,只需要交好或收服一名系统拥有者,就能选择此人所系统的一项功能。 然而五百年后的世界,顾潇无一不感觉陌生,米国研究出了超级士兵血清,西盟研究出了生物基因改造。而夏国在2030年在多个科技领域领先米国,使得全球将要打破的和平又一次回归和平,几百年的发展,各小国附属大国。而世界前方的强国,已经征服了火星,使火星改造成了宜居星球。至于远一点的颗星球,正在被机器人们不断的挖掘着…… 癌将被攻破…人类平均寿命延长至100岁,长命百岁已经不是说说。 后来顾潇发现,不只是他穿越了500年后,甚至还有2100-24年的,不仅如此,穿越者、重生者、轮回者,都将出现。 顾潇获得系统在这个世界的第一个任务就是掌握整个太阳系,而多年后将会有外星种族来临!不会有什么抹杀惩罚,没有被制定的命运走向蓑衣寻马三千刹,一剑不断九州寒。江湖路慢,少侠,何不饮酒停马,回看江湖......赵阳意外绑定可以往返现代与明末的传送门。 穿过传送门,对面是气势汹汹,向着他冲刺而来的八旗骑兵。 数次尝试都铩羽而归,赵阳直接上交传送门,与官方合作。 当官方看到赵阳展示的另一个世界后,整个大夏都为之轰动。 一个星球的资源,一个全新的未开发世界! 大夏官方第一时间下定决心,制定绝密计划,设置最高权限。 终于,再次踏入明末大地的赵阳。 身后,是一条蓄势待发的庞然巨龙……
耀眼的星辉 无限进化:从0级螳螂开始吞噬 万武仙尊 从一只猫开始 时空赏金猎人 风云之天下无魔 联盟:峡谷大魔王,你管这叫五五开? 仰望山村 大鼓皇后的婚事 人化灵传 我的宠物是大佬 天间录 末日节度使 废体乱仙途 网游:重生成为NPC 我!狂神 六界兴歌2 异域剑尊 什么?一我是鬼王女儿 天医下山:老婆是冰山女神 白湖亭有到长乐的汽车站 泽国到利川汽车 南城汽车站到桥头镇 重庆购买汽车票的软件 白湖亭有到长乐的汽车站 西渡到娄底汽车站 凤凰到源陵的汽车列表 深圳北到广州南 汽车站时刻表 隆回汽车东站时刻 随州到应城汽车多久 无锡到武冈长途汽车 贵阳到重庆汽车那个站 张金到沙市汽车时刻表 泽国到利川汽车 南昌到黄山的汽车 重庆购买汽车票的软件 凤凰到源陵的汽车列表 隆回汽车东站时刻 汝州汽车站服务电话 广州汽车站到白云机场 泽国到利川汽车 安丘到即墨汽车 南通汽车总站 定州到唐山滦南汽车时刻表 龙华到芳村汽车站时刻表 张金到沙市汽车时刻表 隆回汽车东站时刻 南通汽车总站 汝州汽车站服务电话 隆回汽车东站时刻 重庆购买汽车票的软件 泽国到利川汽车 惠阳到罗定汽车 南昌到黄山的汽车 曲阜日照汽车价格表 重庆购买汽车票的软件 惠阳到罗定汽车 南城汽车站到桥头镇 张金到沙市汽车时刻表 安丘到即墨汽车 方城到亳州汽车电话 菏泽到阳泉汽车票价 白湖亭有到长乐的汽车站 太康到太康汽车站 安丘到即墨汽车 惠阳到罗定汽车 随州到应城汽车多久 嘉兴汽车北站下班时间 南通汽车总站 泽国到利川汽车 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 一品宰辅 轮回万万年,我竟是武道之神!? 亓:凭依各地的梦战 路人系统之命运重生 乾坤修法录 快连下载 亚星管理平台 亚星游戏官网 快连下载 亚星管理平台 重庆购买汽车票的软件 隆回汽车东站时刻 菏泽到阳泉汽车票价 颍上汽车站站台有几路 吉首至龙山的汽车时刻表 菏泽到阳泉汽车票价 无锡到武冈长途汽车 定州到唐山滦南汽车时刻表 龙华到芳村汽车站时刻表 贵阳到重庆汽车那个站 深圳北到广州南 汽车站时刻表 南昌到黄山的汽车 随州到应城汽车多久 南昌到黄山的汽车 隆回汽车东站时刻 广州汽车站到白云机场 南城汽车站到桥头镇 方城到亳州汽车电话 南城汽车站到桥头镇 隆回汽车东站时刻 贵阳到重庆汽车那个站 南城汽车站到桥头镇 南昌到黄山的汽车 凤凰到源陵的汽车列表 汝州汽车站服务电话 丽水到乐山有没有汽车票 汝州汽车站服务电话 深圳北到广州南 汽车站时刻表 白湖亭有到长乐的汽车站 龙华到芳村汽车站时刻表