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
9月新上映的电影电影12月档期日本爵士的电影去印度拍电影马克沃尔伯格的电影9月新上映的电影部部夸电影首页日本爵士的电影哪可以看最新的电影1996电影罪恶亦舒胭脂电影日本爵士的电影日本移民相关电影亦舒胭脂电影28天后电影1996电影罪恶霹雳娇娃电影完整版阿克谢库马尔主演的电影马克沃尔伯格的电影电影萧红宋佳版最新电影上映时间表12阿克谢库马尔主演的电影哪可以看最新的电影电影邻居大战电影 金铃传最新电影2014已上映10月电影 金铃传电影坏老板的插曲电影萧红宋佳版快播有什么好看的电影 蓝颜玉是智族的天才,天生智力无限,精神力初始三十级。在他十三岁时,离开了智族,入了阳暮言组织的拯救者奇团,认识了妖族的小公主美琥,金刚族王子艾果……在这其中竟还有来自异族的夜墨修,他是敌是友? 在剿灭异族的过程中,花界彼岸花——慕兮月与他相识、相知、相爱。之后的几次生死之战,导致拯救者大换血,面临着土崩瓦解,蓝颜玉是否能重振拯救者奇团?在世界即将要毁灭时,他又能否拯救世界? 少女珂玥秘密守护着“时间之刃”——能将时空伸缩、折叠及扭曲的远古神器。魔界使者姽媚奉命转世追杀夺宝。暗物质世界(异次元时空)的蜥族人创立空玄教,寻找上古神族基因,欲统天下……神秘的“觉醒者”,似乎无处不在,却让人看不见摸不着。珂玥几近绝望之际,才发现“觉醒者”竟然是……?小时候还不懂得读书写字,便喜欢听姥姥跟我讲她年轻时候的故事。姥姥本来是大地主家的被长辈们宠溺的小女儿,但在那个动乱的年代日本人的入侵打破了原本的一切,姥姥的长辈不管是经商还是入仕都没有一个好的结局,百年的大家族渐渐落魄。姥姥的父亲也因参与地下党打鬼子被抓,很快脑袋便落地了,姥姥7、8岁的年纪就离开了家,成了一位流离失所、躲灾躲难还要坚持读书的女学生。抗日胜利了,姥姥刚回到自己的家乡就要开始崭新的生活,蒋介石政府却在败逃台湾之前将黄河堤坝扒开,一时间水漫金山,姥姥和家人再次沦为了难民,漂泊当中姥姥与自己唯一的姐姐失散,不知是命运安排还是什么,姥姥在尉县的一个小村子里吃上了一顿特别饱的饭并被一个农户家庭收留作为儿媳妇,也就我的姥爷家。新中国成立,姥姥的后半生便停留在了这个小村子,她的故事也和新中国农村乡土的故事交织在了一起......  “我是谁?我从哪里来?我要到哪里去?”   每日每夜感受死亡的轮回,每天都在自我提醒自己的身份。   他只想活下去,只想找到自己的亲人,只想弄明白自己到底是谁。   他既是劫难,亦是救赎。   罪与罚,一念之间。   一念之间,成神成魔。女孩臻浅患有严重的被迫害妄想症,遵照医嘱在放学后独自散心。不料,之后目睹男孩“魏砷”杀人现场。在一场惊心动魄的逐命逃亡后回到家中,一觉醒来,陡然发现时间倒转。面对倒转的时间,步步紧逼的凶手,她该何去何从……【叮,您的神级搞钱系统已激活!】 伴随着系统的提升声,李凡终于明白了人生的真谛:那就是拼命的搞钱! 李凡借助系统给予的能力,卖配方、开面馆、创业投资一条龙。 秘制水煮肉片,鲜美嫩辣! 天外香炸鸡腿,外酥里嫩! 神级土豆牛腩,酱香浓韵! 除了各种自创顶级菜品外,还有蒸羊羔、蒸熊掌、蒸鹿茸、烧花鸭、烧雏鸡、烧子鹅、卤煮咸鸭、酱鸡、腊肉、松花、小肚儿、晾肉、香肠……等绝味厨艺! 从面馆开始,李凡创业后倚靠着无数神级配方在美食界横行霸道、平步青云的故事拉开序幕…… 月影照沙丘,星河近眼眸。明月无尘染,沙海风声留。处处沙堆现,地鸦鸣远汉。西漠鸦声鸣,雄鹰俯身行。小院传道语,薄团坐俊青。本出生自皇族的唐天皇,却有家难回,名有着强大的血脉,却要隐藏于世……内容提要:推荐新书《神魔霸体》http://www.17k.com/book/705692.html天地六界,远古鸿蒙。一个卑微的小人物毕凡,一步步修炼成长。闯魔域煞气冲天、战潜龙一鸣惊人、闯天下成就威名、夺宝库独占鳌头、入混沌翻云覆雨、踏六界唯吾独尊、斗鸿蒙逍遥至尊。动乾坤、踏六界、斗苍穹、破鸿蒙,诛仙逆天成就六道仙尊。爱恨情仇、兄弟义气、刀光血影,无穷无尽的宝物、灵兽、功法,尽在《六道仙尊》。喜欢的请加群:云霆飞书友群:177856368 YY频道ID:53771214 YY群:3209667大家点击作者笔名进去,记得‘崇拜下’、‘留脚印’、‘打酱油’,每天一个号都可以点击一次。谢谢!!推荐两本书《特工教师传奇》《重生之官路高升》商界天才在车祸中丧生,却意外重生在一个底层小人物体内。 时间倒退二十年,突然多了一个可爱女儿,该哭还是该笑?老婆这么漂亮,会不会不安全? 这是一个满地黄金的时代,机遇多如星辰密布,淘金者多如过江之鲫。 林皓文决定彻底释放野性,化身一头吸金巨兽。 林皓文:“各位商界大佬你们好,我是来教你们做人的。”
火影世界的海贼兑换系统 人人觉醒,结果你变身? 反派:记忆曝光,女主跪求我原谅 看事 我,魔教教主,开局镇压圣女 记忆中的光点 太上难忘情 九星荒天诀 吾为道一 天赐神机 从乞丐开始成为源师 山海霸主 念武记 霹雳元武 持剑行 丧尸末世:菜狗也怕死 秦始 龙珠:开局加入聊天群 纨绔剑道 江湖:无奈扮虎吃猪 碟仙诡谭 bt 电影 卡特莉娜卡芙电影 霹雳娇娃电影完整版 马克沃尔伯格的电影 电影12月档期 电影坏老板的插曲 霹雳娇娃电影完整版 电影力王之监狱全集 最新电影2014已上映10月 日本移民相关电影 演绎李小龙的电影 演绎李小龙的电影 萧红电影宋佳 卡特莉娜卡芙电影 9月新上映的电影 马克沃尔伯格的电影 韩国电影床快播 碟仙诡谭 bt 电影 周汤豪演过的电影 日本爵士的电影 卡特莉娜卡芙电影 日本爵士的电影 周汤豪演过的电影 阿克谢库马尔主演的电影 1996电影罪恶 萧红电影宋佳 碟仙诡谭 bt 电影 电影12月档期 周汤豪演过的电影 最新电影2014已上映10月 马克沃尔伯格的电影 电影肉欲的渴望 去印度拍电影 9月新上映的电影 电影邻居大战 电影 金铃传 去印度拍电影 霹雳娇娃电影完整版 电影邻居大战 28天后电影 电影 金铃传 电影力王之监狱全集 电影萧红宋佳版 韩国电影床快播 亦舒胭脂电影 电影肉欲的渴望 演绎李小龙的电影 电影 金铃传 萧红电影宋佳 电影夏天的拉花观后感 亚星官网 亚星官网 亚星游戏官网 亚星官网 亚星官网 现世界合成指南 留香传 我在魔法世界里横行霸道 天地符纹动九天 异世皇子之至尊骨 欧博官网 百家乐官网 澳门葡京游戏官网 欧博官网 亚星游戏官网 演绎李小龙的电影 萧红电影宋佳 碟仙诡谭 bt 电影 去印度拍电影 日本爵士的电影 哪可以看最新的电影 电影坏老板的插曲 亦舒胭脂电影 周汤豪演过的电影 电影 金铃传 哪可以看最新的电影 演绎李小龙的电影 电影 金铃传 电影邻居大战 周汤豪演过的电影 周汤豪演过的电影 韩国电影床快播 演绎李小龙的电影 碟仙诡谭 bt 电影 电影坏老板的插曲 9月新上映的电影 电影力王之监狱全集 霹雳娇娃电影完整版 阿克谢库马尔主演的电影 快播有什么好看的电影 去印度拍电影 演绎李小龙的电影 卡特莉娜卡芙电影 电影坏老板的插曲 电影坏老板的插曲