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 in Bootstrap utilizes 12 columns that render out at widths of 724px, 940px (default without responsive CSS included), and 1170px. Below 767px viewports, the columns become fluid and stack vertically.

<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

p>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="span6">
        Level 1 column
        <div class="row">
            <div class="span3">Level 2</div>
            <div class="span3">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>

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>

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: 767px) { ... }
  /* Portrait tablet to landscape and desktop */
  @media (min-width: 768px) and (max-width: 979px) { ... }
  /* 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 hiding 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
火车票可以补嘛东莞有到桂林的火车吗?无锡到广东惠州的火车票价广东到呼伦贝尔的火车时刻表火车票可以往后走火车票可以补嘛当日票次往后火车改签无锡到广东惠州的火车票价徐州火车到盐城火车t53信阳到长治北的火车有几趟火车票可以补嘛广州到江西抚州火车信阳到长治北的火车有几趟无锡到广东惠州的火车票价火车t53改签火车票可以改始发站吗义乌一桂林火车票义乌一桂林火车票商丘临沂火车时刻表襄阳到潢川的火车票义乌一桂林火车票徐州火车到盐城丹凤至江西南昌的火车票火车票可以往后走山东兖州到贵阳火车票广东到呼伦贝尔的火车时刻表明天滕州至泰安的火车票多少钱天津到邢台火车距离广州到江西抚州火车 天下第一楼,天香国最大的酒楼,各种特色菜品,色香味俱全,远近闻名,其财力富可敌国。 这仅仅是外表,内有乾坤,天下第一楼,还是天香国最大的情报组织、暗杀组织。 柳玄意外穿越到魂魂大陆,作为天下第一楼楼主的外孙,具有炎族血脉,开启双系统,大贤者系统和商城系统。 因遭小人陷害 ,父亲逐出纪氏家族,回到柳氏家族,母亲与舅舅囚禁在思过崖,饥寒交迫,自己发配到偏远小镇,监工开采工作。 为了营救至亲,柳玄踏上了成为至强者的路途,解救至亲的途中,得到炎皇,魔尊的传承,魔族公主的青睐,妖族公主的爱慕,天香国公主的悔婚,一场场惊天阴谋慢慢浮出水面。 被迫逃离,降临到异世界,认识相似之人,他是否能重回奥拉星,再次见到伙伴们?王伟是合约车司机,从2022年穿梭到1939年遇到武汉大学女生田雨,与之产生了爱情,利用2022年的合约车技术,帮1939年的抗日军民实现了神鬼莫测的交通,在那个喇叭一响,黄金万两的时代不仅收获了金钱,也收获了爱情。春秋五霸,战国七雄,合纵连横,逐鹿中原监狱禁闭室中有句话人尽皆知,有朝一日龙抬头,定让黄河水倒流,有朝一日虎归山,定让血染半边天。长白神庙,尸海迷巢,冥峡天棺,黄泉九鼎…… 一件来历不明的人皮寿衣将我拖入一个巨大的旋涡之中。 为了活命我必须借寿前行,活人的寿要借,死人的寿更要借。 当我以为自己可以彻底摆脱那件寿衣的时候,才发现这场阴谋刚刚开始,而我只是其中的一枚棋子……我是老中医,专治各种吹牛逼! 我武道超神,吊打一切不服气! 秦飞偶得神秘传承,拥有神眼,从此医术通天,武道超神,且看他逆天崛起,笑傲人生。离家出个走,居然遇到了一名博士。 他们之间的缘分远不止一面之缘,一些奇奇怪怪的东西随着两人的接触,渐渐跑进了他的生活。 古怪离奇的东西变成了自己的日常。 世界的本来面目被一点点揭开,能窥觑到的每一个部分都让人惊异万分且难以承受! 而这些仅仅是大千世界的九牛一毛而已! 就算知道了太多太多,需要很长时间去消化。 那这,是否又真的是世界最真实的那一面呢? 这博士,究竟又是怎样的…人呢? 他又小心翼翼的维护着怎样的秘密…? 【对世界的新认知!】 【对科技的惊发现!】 【对未来的再思考!】 【认知崩塌重新排序的宇宙狂想曲!】命运凄惨致死的洛严被一股奇异的力量复活,从此以后,洛严便踏上了魔法师的道路,神挡杀神,佛挡杀佛,最终能够突破,百级成神吗?特种兵赵阳一觉醒来却发现自己竟然魂穿三国时代,并且获得了无双帝皇系统。他从此开始收名将,纳美人,灭刘备,退孙权,拒曹操煌煌一世。曹操:“我曹氏子弟不如子炎分毫。”刘备:“谁能帮我除了赵子炎,我封他为王。”孙权:“赵子炎是上天派来惩罚我的吗?”赵阳:“我还没发力,你们全倒下了,还让我怎么玩啊?”最后问鼎江山一统天下。赵阳看着眼前的皇座,心中无限感慨:“我本低调,但实力不允许,奈何奈何~~”
江南名片,片片有名 我只想安全的浪 我在高武世界当倒爷 神话:开局被女帝上门求婚 穿越时间的思念 今天做梦了吗 暗雨之黑化 逆天进化成龙 厨子不风流 废土穿越商 大反派之路 奇门传 猎魔:美味佳肴 爸妈,我是你们亲生的吗? 猎灵师传 网游:神级宠物助我升级 天地参一 从托孤到一代明君 名为仙 教师的黑科技系统 河口到昆明火车k9824 兰州到金昌的火车在哪个站 改签火车票可以改始发站吗 义乌一桂林火车票 河口到昆明火车k9824 柳州六盘水的火车票 代销点可以退火车票吗 赣州到民权火车有几趟 山东兖州到贵阳火车票 广州到江西抚州火车 徐州火车到盐城 徐州火车到盐城 丹凤至江西南昌的火车票 火车t53 镇平到邓州火车站班车 火车票可以往后走 代销点可以退火车票吗 山东兖州到贵阳火车票 襄阳到潢川的火车票 火车票可以补嘛 兰州到金昌的火车在哪个站 无锡到广东惠州的火车票价 东莞有到桂林的火车吗? 舞钢到平顶山火车票 赣州到民权火车有几趟 丹凤至江西南昌的火车票 山东兖州到贵阳火车票 东莞有到桂林的火车吗? 襄阳到潢川的火车票 山东兖州到贵阳火车票 义乌一桂林火车票 兰州到金昌的火车在哪个站 广东到呼伦贝尔的火车时刻表 火车票可以补嘛 丹凤至江西南昌的火车票 火车票可以往后走 潍坊至河南焦作的火车票多少钱 代销点可以退火车票吗 丹凤至江西南昌的火车票 潍坊至河南焦作的火车票多少钱 火车票可以往后走 信阳到沈阳火车票查询电话 商丘临沂火车时刻表 成都有到海南省三亚市的火车吗 舞钢到平顶山火车票 兰州到金昌的火车在哪个站 徐州火车到盐城 广东到呼伦贝尔的火车时刻表 天津到邢台火车距离 当日票次往后火车改签 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 我在高中三年无限重生 儒道:我是三界圣人! 破晓之轮回 异瞳者1 圣灵星皇子到地球做大少 欧博官网 百家乐官网 亚星管理平台 欧博官网 AG真人 潍坊至河南焦作的火车票多少钱 信阳到长治北的火车有几趟 成都有到海南省三亚市的火车吗 山东兖州到贵阳火车票 义乌一桂林火车票 去山东泰安的火车 赣州到民权火车有几趟 明天滕州至泰安的火车票多少钱 代销点可以退火车票吗 潍坊至河南焦作的火车票多少钱 潍坊至河南焦作的火车票多少钱 去山东泰安的火车 襄阳到潢川的火车票 改签火车票可以改始发站吗 柳州六盘水的火车票 东莞有到桂林的火车吗? 无锡到广东惠州的火车票价 商丘临沂火车时刻表 火车t53 河口到昆明火车k9824 火车票可以往后走 信阳到沈阳火车票查询电话 无锡到广东惠州的火车票价 代销点可以退火车票吗 信阳到长治北的火车有几趟 无锡到广东惠州的火车票价 山东兖州到贵阳火车票 徐州火车到盐城 去山东泰安的火车 当日票次往后火车改签