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
巫溪卧铺汽车有厕所吗莱西到黄岛汽车站电话江苏港城汽车运输集团成都到乐至最近汽车站宿迁去东明的汽车巫溪卧铺汽车有厕所吗海门到苏州长途汽车站时刻表江苏港城汽车运输集团芜湖汽车站到泾县上海至绵阳客远汽车丹竹头到广州汽车江苏港城汽车运输集团漯河到明港有汽车吗芜湖高铁站坐汽车天河到鹤峰的汽车上海至绵阳客远汽车吉安501在汽车站台龙岗到惠阳汽车客运站龙岗到惠阳汽车客运站星沙-汽车南站泉港到泉州的汽车站时刻表龙岗到惠阳汽车客运站芜湖汽车站到泾县上饶-常熟汽车宿迁去东明的汽车宁海到商丘的汽车站时刻表成都到铜仁有汽车吗上饶-常熟汽车星沙-汽车南站漯河到明港有汽车吗一次机遇之下少年重获再活一世的机会来到了一处崭新的世界,这里没有花俏绚丽的魔法,人人却都崇尚修炼魂力,修行极其艰难却不断有人前仆后继,因为命运的安排少年同样踏上了这条永无止境的道路那他又会到达怎样的地步?这其中又会有多少命运的羁绊?又会有多少的艰难与辛酸...... &amp;lt;万界魂破&amp;gt;是我的第一本书,所以希望承蒙各位读者的关心徒儿,为师为你算了一卦,终于找到了你无法晋升的原因,你要修成正果,需得救死护伤,解救众生的疾病之苦,同时还需去游历红尘,经历七七四十九次情劫,得到七位凡间女子的至真至纯的真爱,如此你才能和你们师兄们一样修成正果。鸿钧老祖对着自己的小徒弟说道。 “师傅,你的意思是徒弟我要到凡间经历劫难吗?” “差不多就是这个意思!!”。 “师尊,这凡间可是恶人横行,妖魔遍地,再说了,治病救人到没问题,但是凡间的女子都很物质化,要求别墅豪车,金银财宝才能结婚,哪里还有至真至纯的爱情,徒儿不想去,徒儿就当个小小的仙人,也无所谓!!!”。 “不行,你不要脸,师尊还要脸呢,我的弟子咋能是一个小小的人仙”。 “徒儿去凡间,可以带几个法宝过去防身?” “你这顽徒,对付手无缚鸡之力的凡人,带宝贝去,为师将封印你的记忆和仙力,你就好好的历情劫吧!!!”老祖怒极而笑。 说完,鸿钧老祖,左手撕开一个黑洞,右手一把抓住秦风流,把他扔进了黑洞。 顾楠穿越平行世界,此世文娱不复前世繁华,正值百废待兴之际。   一首歌,顾楠拉来千万投资!   执导第一部电影,轰动整个娱乐圈!   导演、写歌、小说……   以前世文娱之繁华,顾楠创建了此世最富有盛名的文娱帝国!玄龙大陆,以武为尊。 少年叶平安得到败天武帝的至尊天眼,从一个卑微的蝼蚁,成为至高无上的绝世武帝! 一路上白骨累累,红颜多娇路飘摇,无敌路上太寂寥!赵风穿越秦朝成为了始皇帝的第七子,嬴子歌! 原以为远离咸阳便能躲避灾祸,但赵高却找上门,好在系统如愿开启。 【神选一:接受始皇召令,卸下兵权,立即启程返回咸阳。】 【神选二:拒接始皇召令,立刻起兵,自立为王!】 【神选三:接受始皇召令,立刻回都,向始皇索要太子位!】 面对选择,嬴子歌选择了去向嬴政要太子之位。 至此,暴揍胡亥、疯斩徐福、莽破匈奴、凶伏百越..... 蒙恬:报始皇帝陛下,太子殿下率兵诛杀了匈奴二十万。 嬴政:...... 章邯:报始皇帝陛下,太子殿下已经诛杀了六国叛徒,这是刘邦与项羽的人头。 嬴政:...... 带着疲惫的身心和仿佛燃尽的灵魂,苍浩回到了家乡,成了地产公司的普通员工,却惊讶的发现上司是自己的青梅竹马……都市商场,杀机陡现,神秘敌人暗中潜伏,且看苍浩如何突出重围。这不是最美好的世界,但这是一部热血逆袭,用双手创造一个理想年代。一段爱恨情仇,一代精神领袖,横跨三界,携美女畅游九州,奋战疆场,金戈铁马,策马奔腾,穿越万里河山,与夏王开华夏一统,与褒姒调丝竹之情,领勇士救刘邦,出入汉宫,霓裳羽衣,再现华夏文明,助太宗杀兄泡嫂,与李治共享武媚,环肥燕瘦,皆出其手,他,是英雄、是败类、是奸雄、还是淫贼,上下五千年,皆无定数,一切皆有后人评说……一洛之海,万丈之深,水是命源,洛海之根改革开放至今的四十年间,注定了中国历史的再次波澜壮阔。 梁海星,一位农村大学生,进入单位后,因发现上司不该发现的龌龊之事,后又被人击伤,险些丧命,在即将实现副厅长的梦想时,却突然与曾经的“恩人”彻底撕裂,于是,毅然选择了辞职。虽被漂亮的同事、下级苦苦追求,但对妻子的爱始终不渝。高燕,一位理想的机关年轻漂亮女干部,因爱生恨,万念俱灰,收养梁海星儿子后去了国外。正直的周思国,由市委书记成长为副省长,时常陷入家庭与人情的纠缠,但不失高级领导的高风亮节。黄正刚一位正直的老领导,致力培养梁海星,但残酷现实也时常使其感到无奈。刘大可一位基层成长起来的厅长,左右逢源,屈伸有度,但却极为贪婪,最终机关算尽。吴强,从乡镇干部一步步努力成长为市委副书记,然而,追求的变异使其整日惶恐不安,初恋女友给予的不仅仅是温柔,安排好妻子的后事,毅然走向了冰冷的湖水。漂亮的陆美霜对赵良既爱又恨,超出了常人的理解……。李飞平是一个兢兢业业(爱好摸鱼),刻苦学习(很不正经)的科研工作者,却因为一次实验室事故死于非命,再睁眼,他发现自己穿越到一个仙魔妖佛、儒墨法道并存的仙侠世界。 等等,我的金手指是什么? 知网!!! …………………… 这是一个不正经的穿越者在异界搞科研的故事。
大能耐赘婿 世末日记 熊的孩子 吉天记 高三回忆录 灵异故事杂谈 唱歌就能救妹妹,我唱疯了 80后的年轻人 末世穿越之旅 海贼里的傀儡之剑 大梁镇妖司 返祖我的先祖是曹孟德 神的主宰:混沌世界 选择之争 护客人 入屠 从只狼开始的交易人生 淘汰自己 艾斯兰德 平行重生 电力汽车停靠站 恩施至乌鲁木齐汽车票 吉安501在汽车站台 宿迁去东明的汽车 电力汽车停靠站 广州到茶陵汽车 澄海到郑州汽车站时刻表 投诉长途汽车电话号码 宁海到商丘的汽车站时刻表 南昌西到瑞昌汽车站时刻表 芜湖汽车站到泾县 开封有去孟州的长途汽车吗 玉林至柳州汽车 恩施至乌鲁木齐汽车票 巫溪卧铺汽车有厕所吗 宿迁去东明的汽车 澄海到郑州汽车站时刻表 宁海到商丘的汽车站时刻表 九江到武宁汽车票 江苏港城汽车运输集团 恩施至乌鲁木齐汽车票 天河到鹤峰的汽车 莱西到黄岛汽车站电话 芜湖高铁站坐汽车 上海至绵阳客远汽车 玉林至柳州汽车 宁海到商丘的汽车站时刻表 莱西到黄岛汽车站电话 九江到武宁汽车票 宁海到商丘的汽车站时刻表 宿迁去东明的汽车 恩施至乌鲁木齐汽车票 成都到乐至最近汽车站 巫溪卧铺汽车有厕所吗 上饶-常熟汽车 宿迁去东明的汽车 成都到乐至最近汽车站 吉安501在汽车站台 玉林至柳州汽车 天河到鹤峰的汽车 成都到铜仁有汽车吗 南昌西到瑞昌汽车站时刻表 周口到铜陵汽车 澄海到郑州汽车站时刻表 芜湖高铁站坐汽车 恩施至乌鲁木齐汽车票 开封有去孟州的长途汽车吗 成都到铜仁有汽车吗 玉林至柳州汽车 海门到苏州长途汽车站时刻表 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 龙门隐侠 异能世界:开局激活神之手 神坛:九星降世 宠物小精灵之无敌人生 一剑凌尘西边来 澳门葡京官网 快连下载 欧博官网 澳门葡京官网 欧博官网 南昌西到瑞昌汽车站时刻表 投诉长途汽车电话号码 成都到乐至最近汽车站 九江到武宁汽车票 广州到茶陵汽车 南昌西到瑞昌汽车站时刻表 宿迁去东明的汽车 成都到乐至最近汽车站 澄海到郑州汽车站时刻表 宿迁去东明的汽车 丹竹头到广州汽车 海门到苏州长途汽车站时刻表 丹竹头到广州汽车 星沙-汽车南站 上海至绵阳客远汽车 泉港到泉州的汽车站时刻表 莱西到黄岛汽车站电话 九江到武宁汽车票 漯河到明港有汽车吗 天河到鹤峰的汽车 罗湖汽车客运站到佛山汽车站要多久时间 莱西到黄岛汽车站电话 吉安501在汽车站台 罗湖汽车客运站到佛山汽车站要多久时间 玉林至柳州汽车 海门到苏州长途汽车站时刻表 开封有去孟州的长途汽车吗 上饶-常熟汽车 芜湖汽车站到泾县 丹竹头到广州汽车