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
蚌埠劳动保障局电话ems下单电话查询蚌埠劳动局电话投诉有用吗包头防疫站电话包头高新区安能物流电话号码蚌埠劳动保障局电话ems西安市明光路电话蚌埠劳动局电话投诉有用吗ems西班牙电话号码ems西安国际站点电话查询ems西安工业园电话蚌埠劳动局电话投诉有用吗ems西安曲江电话号码包头快递送餐电话包头东河邮政西区分局电话ems西安国际站点电话查询ems西安网点查询电话包头建设路派出所电话包头建设路派出所电话ems咸阳电话号码ems西宁电话包头建设路派出所电话ems西班牙电话号码ems厦门电话号码包头高新区安能物流电话号码ems厦门处理中心电话包头赶集网电话ems厦门电话号码ems咸阳电话号码ems西安曲江电话号码本作讲述了希望中学的学生邱涵和他的伙伴受组织委托为了收集陨石箭意外发现邱涵外公的故友,也就是希望中学校长涉及违法勾当,并进一步展开发现许多与其相关的意料之外的黄赌毒事件的故事。最后主角团的生死,就要靠各位粉丝老爷的评论和对小说前后文的理解咯!刘骁穿越到三国,获得无数能让人成仙的精魂。 原以为可以在三国活的逍遥自在,却发现居然很多人都有。 刘骁很淡定,因为他能吞噬精魂。 可是很快他就发现,自己竟然有统一三国的趋势。 诸葛亮的八卦阵变成战舰,司马懿能撒豆成兵。 庞统能呼风唤雨,鲁肃能点石成金,华佗长了一双透视眼。 最恐怖的是司马昭,竟然能听见别人的心声。 刘骁赶紧逢人便解释:“我真的没想统一三国啊!” 考研上岸的许青,终于端上了梦寐以求的铁饭碗。 只是,这个饭碗跟他想象的有点不一样,他穿越到一个刚刚亡故的捕快身上。 更是被一个身材高挑,黛眉星瞳的俊俏女捕头看中,被对方挑过去当手下。 许青原本是拒绝的。 直到他看见女捕头随随便便掰断了一根石头做的灯柱…… 女捕头:“我不喜欢勉强别人,你若不愿意跟着我便说出来。” 许青:“卑职愿意,这乃是卑职遵从内心的决定!无有半点勉强之意!” 五行杂灵根的修真废物,没有老爷爷、没有逆天神器、更没有超级仙宠! 来自地球联邦,征战无数星辰的机械师林沐意外魂穿修真位面!在修真与生活完美融合的世界,看科技与灵力如何打造最为强大的仙械军团! “我一个人,就是一座仙门!“敢问诸天神魔可有谁敢与吾一战?” 漫天神庭大帝,无数魔神妖王,望着那道分身伟岸的身影,只得俯身行礼…… 一身黑金皇袍猎猎作响,来自混沌时空那喧嚣无比的风儿在他身边缓缓蹭过,引得金冠上的垂帘悠悠摆动。 这里是最原始的混沌空间,同样是也宇宙的诞生之地。 而那道面对无数强大神魔的身影,却只是处在原始混沌空间这人无数分身的其中一个。 事情每天都在发生,所以我尽量每天都写一写。不要在乎它的真假,你当茶余饭后的故事。你说它是真的,那我希望你能通过这一段一段的故事,有个分辨心,未来不要经历一些骗局茫茫天地,亘古永存,所有生灵,不断轮回,无限延续。 忽有一日,天地变,三界崩,阴阳转,轮回断,从此世间再无轮回,直至天地毁灭.....远古洪荒,魔兽争强。人类处境,极为凄凉!他矢志改变命运,被逼流浪逃亡。眼见巨树雄伟,攀援上去才知别有洞天,再折服鹏象,无意成皇!从此后纵横三界,扭转乾坤,指点阴阳!开创了一个万古传奇,龙凤呈祥…… 仅仅50世纪后的地球就已经人口暴涨,为了能够继续生存下去人们开辟了神秘的第二區,对此男主等人开始了他们奇幻的探索之路。 当稚嫩少年遇到乱世风云,当家园遭到野蛮的屠杀,当亲人的胸膛在少年眼前被利剑贯穿,一切报复都难以抹去血海深仇。亲人的血液沾染了双手,泪水已然流尽。 当少年不再流泪,当少年不再为私仇,当少年心怀天下与黎民,仇恨得到原谅,乱世已然成历史,少年已然成暮年。
曼陀罗旅人 魔晶启元 大唐妖魔录之扫把星转世 我是人类最出名巨星 天外通天 太祖降临:我在地府当差 仗剑啸苍穹 逍遥小王爷 行之千里 我的世界之安德兰战役 穿越到影视的反派 光之巨人:我是迪迦 骷髅领主的成长日记 田畯野老 玄幻:毛头小子穿越三界 一个程序员穿越回大宋 世界之罪!? 光厘 从散人开始 重生之我的九十年代 蚌埠劳动局电话投诉有用吗 ems西安中心局电话是多少 ems厦门处理中心电话 ems西安市经济开发区发投分公司电话号码 蚌埠劳动局电话投诉有用吗 包头防疫站电话 ems厦门电话查询 ems西安经济开发区电话号码 ems厦门处理中心电话 ems西安劳动路电话 ems西班牙电话号码 ems西安中心局电话是多少 ems厦门客服电话 ems西安工业园速递电话 蚌埠劳动保障局电话 包头高新区安能物流电话号码 ems西安邮政中心电话多少 ems厦门处理中心电话 ems西樵电话 蚌埠劳动局电话投诉有用吗 ems西安工业园速递电话 包头东河邮政西区分局电话 ems下单电话查询 包头快递送餐电话 ems西安国际站点电话查询 ems厦门客服电话 ems厦门处理中心电话 ems下单电话查询 ems西樵电话 ems厦门处理中心电话 包头高新区安能物流电话号码 ems西安工业园电话 包头防疫站电话 蚌埠劳动保障局电话 ems厦门电话号码 包头高新区安能物流电话号码 包头防疫站电话 ems西安网点查询电话 ems厦门客服电话 包头东河邮政西区分局电话 包头赶集网电话 ems西安劳动路电话 ems显示快递员电话 ems西安邮政中心电话多少 包头快递送餐电话 ems西安工业园速递电话 ems西安中心局电话是多少 包头赶集网电话 ems厦门客服电话 ems西安市明光路电话 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 被仙界除名竟成妖族王者 穿越时空之风流皇帝 江天成名录 那时我等年少轻狂 我应该是正义的超人吧? 百家乐官网 澳门葡京官网 葡京官网 百家乐官网 万利游戏官网 ems西安曲江电话号码 ems西安中心局电话是多少 ems显示快递员电话 包头高新区安能物流电话号码 ems厦门处理中心电话 蚌埠劳动局电话投诉有用吗 ems西樵电话 包头建设路派出所电话 ems西安劳动路电话 ems咸阳电话号码 ems厦门客服电话 ems下单电话查询 ems下沙电话号码 ems西安中心局电话是多少 ems西宁电话 ems西安网点查询电话 ems厦门电话号码 蚌埠劳动局电话投诉有用吗 ems西安劳动路电话 ems西安中心局电话是多少 ems显示快递员电话 ems西安市经济开发区发投分公司电话号码 包头赶集网电话 ems西宁电话 ems西安经济开发区电话号码 ems厦门客服电话 ems厦门客服电话 ems西安曲江电话号码 ems西安市经济开发区发投分公司电话号码 ems西安国际站点电话查询