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
中考作文文艺开头结尾作文节日中的文化中考作文文艺开头结尾中考青春励志作文中考满分作文短评中考满分书信作文大全()的乐趣作文中南路小学六一作文中考作文新颖素材亲情中考满分书信作文600字最高兴的事儿作文400字中考作文文艺开头结尾(走向讲台的我)作文300字左右植物的作文450中南路小学六一作文中考满分书信作文600字知识与未来作文中考满分作文云南中考满分作文云南中考作文好的结尾摘抄遵义市历年中考作文中考满分作文云南中考作文新颖素材亲情中考满分作文写信中考满分作文短评可爱的小姑娘作文中考青春励志作文中考满分作文写信中考作文好的结尾摘抄(走向讲台的我)作文300字左右什么?我一努力就成了万界至尊,我的剑是九天玄玉剑?我的空间吊坠是九天明月坠?我的鞋子是九天星月鞋?我的衣服…… 就连我内裤都是九天精金甲? 万界主宰齐呼,前辈手下留情,我等臣服!!!! 远古巨兽与人类并存的荒古世界,亿万种族,仙门林立,满天诸法,争斗不息。 浩荡似深渊永无止境,杀戮如星辰亘古恒久。 天才少年,遭天妒忌,飞来横祸,根基损毁,失去一向引以为傲的修为和天赋。 却渐渐发现,原来自己的遭受的一切,都是有人刻意为之,家族毁灭的背后隐藏着一只看不见的幕后黑手。事情的真相没有想象中简单。他发现了某些模棱两可的证据,都指向了自己的猜测。 随着事情发展,一件件事情浮出水面,那些模棱两可的证据化为确凿的证据,他渐渐意识到事情的可怕。 他能否找到事情的真相,找到隐藏在幕后的黑手? 且看一位绝世少年,如何于绝境之中浴火重生,破桎梏,登仙路,探天机,大道争雄,武动乾坤,不死不灭!一念生而扫八荒,一剑出而斩乾坤!穿越明末,阴差阳错做了个假太监。 本想捞点钱远走高飞,却稀里糊涂成了崇祯身边的红人; 稀里糊涂取代了魏忠贤,稀里糊涂剿灭了乱党; 稀里糊涂击败了皇太极,稀里糊涂复兴了大明…… 这一切的一切,全都稀里糊涂的! 我也不知道咋回事儿!世分天地,也分阴阳... 这是一个遍布灵气的世界,人族便在灵气滋养下诞生了第八魂... 千年前,兽族猖獗,异族作乱 人族修罗天神、净天天神横空出世 镇压八荒,人族得以立足 靠着独特的第八魂 人族迅速崛起,后又九幽天神,琉璃天神,月非天神... 诸神并起,人族昌盛 但... 修罗和净天却大打出手 双神陨落... 由此兽族和异族蠢蠢欲动 千年后,两个异瞳天才出世... 又是否会是当年的结局呢.... 有灵智的系统,开局最强。见人秒人,见神杀神,见boss叫爸爸……传说中玛雅人预言2012年是世界末日,可随着2012年过去,世界并未毁灭,时间继续流逝,十年后世界却渐渐发生了变化……男护士转生异世界,竟然被职业评定选择成了最稀有职业-男性圣职者?本来以为可以在异界享受人生,迎娶公主,走上巅峰,没想到卷王居然就在我身边?内卷什么的之前已经受够了!为了对抗内卷,全都点了治愈,男圣职者平凡而又非凡的异世界生活,从现在开始!几百年前,因为地狱之门的开启,导致各种恶魔降临到人间。 天使们为了消除人间的恶魔,将能量赠予了人间一个少女(女勇者) 而少年吸血鬼由纪,美女店长信和蛇女亚提娅组成的’快餐店联盟‘。与女勇者又会发生什么故事呢?地狱之门的真相到底是什么? 大口吃进阶丹,大碗喝养神液。 左手牵着蛟龙,胯下骑着獠牙虎。 不认识我剑修狂神的人,就问你怕不怕! 重生在这一千年以后,成为一名三流小宗门宗主。 在这灵气枯竭,大道凋零的时代,修仙难,重回巅峰更难。 干脆我就养养“宠物”种种“花草”,给二十三个徒弟们指导指导修炼方法...... 一不小心培养了二十三个一流宗师! 现代都市和平生活并未持续多久。当平行的世界被人们挖掘到信息,位面重叠,世界重启。这里变成了修行者的世界。无尽的尸海,广阔的荒漠,万族林立,百家争霸,无情的杀戮将一切虚幻斩断,而何处才是人类栖息之地?修仙就是创业,牢牢控制术法技术壁垒,打造自己的修仙市场帝国,看清修仙市场趋势,利用一切能用资源,让你能白手起家,弹射起步。一年筑基,两年得丹,三年走上修仙巅峰!上头了没有,订阅!
创天主宰 我不想变得和它们一样 大夏执刀人. 西游之通天大圣 灵气复苏:异能者的战争 摊牌,摊牌 不为谁而作的故事 神宠御兽 近战狂兵 我复活在神魔战场 那些年,我在人间当鬼差 焚神决 五月迷踪 长老, 重生:我在玄幻造加特林 不凋花之梦 神袛万岁 末世:吾乃上将潘风! 莲生涟 自然神灵录 作文细节描写技巧 中考作文万能开头亲情 知识与未来作文 中考满分作文短评 作文细节描写技巧 夸夸自己作文二年级 中考作文挥挥手出发 中考满分作文 书信 可爱的小姑娘作文 (走向讲台的我)作文300字左右 中考作文新颖素材亲情 中考作文开头回忆 中国节日活动英语作文 中考作文万能开头亲情 中考满分书信作文大全 中考满分作文短评 中考作文挥挥手出发 可爱的小姑娘作文 遵义市历年中考作文 中考作文文艺开头结尾 中考作文万能开头亲情 中南路小学六一作文 作文节日中的文化 植物的作文450 中考满分书信作文600字 中国节日活动英语作文 可爱的小姑娘作文 作文节日中的文化 遵义市历年中考作文 可爱的小姑娘作文 中考满分作文短评 中考作文万能开头亲情 中招考试语文作文类型 中考满分书信作文大全 中考满分作文写信 中考满分作文短评 中招考试语文作文类型 知识与未来作文 中国节日活动英语作文 中南路小学六一作文 中考青春励志作文 家中亲人的爱作文 中考满分友谊作文 中考作文开头回忆 植物的作文450 中考作文万能开头亲情 中考作文开头回忆 中考青春励志作文 中国节日活动英语作文 ()的乐趣作文 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 司一传 太阳黑雨 冲!奔向光明 十世重生:此世我傲临十方 虽然跌倒了,但要坚持下去 欧博官网 亚星管理平台 澳门葡京游戏官网 欧博官网 亚星游戏官网 作文细节描写技巧 可爱的小姑娘作文 中考满分友谊作文 中考作文文艺开头结尾 中考满分作文云南 中考作文挥挥手出发 作文细节描写技巧 家中亲人的爱作文 中考作文新颖素材亲情 中考作文万能开头亲情 可爱的小姑娘作文 ()的乐趣作文 中考作文文艺开头结尾 中考作文文艺开头结尾 中考满分作文写信 中国节日活动英语作文 作文节日中的文化 可爱的小姑娘作文 中秋赏月小学作文 中考满分书信作文大全 中考满分作文短评 知识与未来作文 作文节日中的文化 中招考试语文作文类型 中考作文开头回忆 最高兴的事儿作文400字 可爱的小姑娘作文 ()的乐趣作文 中考作文文艺开头结尾 中考作文文艺开头结尾