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
狗舔了宝宝的伤口给宝宝煎中药方法海绵宝宝失眠图片大全红心火龙果 宝宝拉肚子刚满月的小宝宝爱哭闹狗舔了宝宝的伤口过敏宝宝可以吃醋吗海绵宝宝失眠图片大全关于宝宝哭百天和宝宝睡觉的表情包荷叶能治宝宝痱子吗海绵宝宝失眠图片大全好大夫宝宝发烧荷叶能治宝宝痱子吗海绵宝宝失眠图片大全和宝宝睡觉的表情包过敏宝宝怎么断奶过敏宝宝可以打疫苗吗刚满月的小宝宝爱哭闹给宝宝喂碳酸钙就吐国外8个月宝宝补什么钙过敏宝宝可以打疫苗吗关于宝宝哭百天怀男宝宝累还是女孩累刚满月的宝宝吃金双歧给宝宝喂药不吃怎么刚满月的宝宝吃金双歧给新幼儿宝宝可以吮痧给宝宝喂碳酸钙就吐果粒橙宝宝感冒能喝吗述说异世大陆,种族纷争,魔物横行,皇子身份,天资受阻,离乡背井,开启新的人生,主角冥皇:“世间没有逆天,我来创造逆天!” 亲爱的读者朋友,请静心阅读我的小说,用鲜花和收藏支持我吧!恋人被逼身死,他怀着滔天恨意进入天劫游戏中; 本想获得极品职业,却落得最差的游戏属性,堪称绝世废物; 天道酬有志者,他历经千辛万苦终于有所收获; 极品职业,携手佳人、好友共抗恶魔,声名鹊起; 战魂、武魂、血魂、法魂,且看他如何抉择! 大敌当前,且看他如何力挽狂澜! 私仇面前,且看他如何对待爱情、亲情和友情! 国家利益,且看他如何先国后家! 纷扰世间,且看他如何矢志不渝! 道士、忍者、剑士、骑士,中西合璧,各国特色; 精彩网游,一切尽在——网游之九转轮回 全球数十亿人类在神秘力量的操纵下,进入恒宇大陆,开启系统,成为领主,发展势力,训练士兵,掠夺资源。万族相争的背景下,田离却发现自己的新手村居然是幽都,能招收无数幽魂鬼怪为其征战万族。 当其他玩家还在为生存苦苦挣扎时,田离已经已经建立起自己的亡魂帝国。 “九幽听令,以血为誓,以冷铁为证,借尔三千阴兵,天地人神,皆可杀。” 田离说完 身后鬼门关大开。叮!恭喜宿主拾取【神仙颜值】,林枭:“我终于能变帅了吗?”林枭走出家门,“轰”林枭顿时被劈的七荤八素,“叮!由于宿主颜值严重超标,所以宿主不戴面具出门会被劈”林枭:“·-·系统我真的好‘喜欢你’啊,我被感动了。”世人都说周瑜周公谨器量广大,有海阔的胸襟,不然怎能吃得下曹操二十万大军? 可苏木却说,周瑜这人不行,很小气,因为他死的时候,诸葛亮都去吊唁了,但诸葛亮死的时候,他就不去! 穿越来的苏木,本想快活地做个富家翁,逍遥一生,但总有人在他面前秀文学、音乐、医术、机械、兵法的那点儿小儿科,惹他不高兴……混沌初开天道始,万族林立生者适。天道如海唤天堑,踏海征途道之巅。 ——洛尘兮 世间万物皆修行,道俱万千谁能赢。百花齐放争天地,唯有强者动乾坤。 ——黄梦燃 天堑海之巅,道祖洛尘兮与仙祖黄梦燃为道统之争一决胜负。最终洛尘兮技高一筹,将黄梦燃打下天堑海之下。自此天堑海上再无仙祖黄梦燃之威名,殊不知这只是黄梦燃借此达到他计划的第一步——重生!当黑夜降临时,你是否会遵循自己内心深处的声音走下去?当面对艰苦困难时,你是选择以击破自身之极限的姿态,还是选择就此屈服?当命运跟你开了一个玩笑,你会不会做出反击?每一个人能掌控的东西变得不可掌控,便是你我要开始改变自身之时。 这是一个掌控世界的故事(以我之见,我之历,我之观),诸君坐下且听我慢慢说。 东来剑帝率领无数修士,打破九重天宇,杀入圣域之内,斩杀万千神族,却因一人叛变,导致一朝身败,无数修士葬身圣域,魂归天外。 断剑携破碎虚空,十万年之后,少年剑辰降世。 因玲珑剑心被心爱之人所夺,一身修为尽废,幸获乾坤珠认主。 断剑觉醒,记忆复苏,剑辰记起十万年前的过往。 记起自己曾一剑斩断擎天山柱,擎天山柱化作登天仙路。 记起自己曾一剑独入冥间炼狱,冥间炼狱化作轮回之路。 记起自己曾一剑斩破诸天避障,诸天融合化为诸天玄界。 ...... 记起自己曾剑断圣域,无数修士魂断圣域。 他日我为剑帝东来,今日我为剑辰,悟无上剑道,修无垢剑体,势要让这天地再难遮住我的眼,无人能够阻挡我的剑。股市,是上帝留存在世间的最后一个伊甸园。 这个伊甸园,是圣人的天堂,凡人的地狱。 不管是圣人又或者是凡人,都被贪婪与恐惧所支配着。 稍不留神,便可能马失前蹄。 是驰骋在天堂里超凡入圣,还是在地狱里摸爬滚打,所有干系。 都寄于…… 指尖之上。 考研上岸的许青,终于端上了梦寐以求的铁饭碗。 只是,这个饭碗跟他想象的有点不一样,他穿越到一个刚刚亡故的捕快身上。 更是被一个身材高挑,黛眉星瞳的俊俏女捕头看中,被对方挑过去当手下。 许青原本是拒绝的。 直到他看见女捕头随随便便掰断了一根石头做的灯柱…… 女捕头:“我不喜欢勉强别人,你若不愿意跟着我便说出来。” 许青:“卑职愿意,这乃是卑职遵从内心的决定!无有半点勉强之意!”
断缘图录 封神之我在商纣当昏君 末日,我的乐园 噩梦教室 破天踪 冰天神帝 逆天魔魂 每晚,一个诡故事 君临于天 神与棋局 游戏王创文决斗 天命昭昭, 遮天帝神 大唐风雨录 我的老师吴泽英 我真不是王爷 穿越异界之最强武尊 末世求生:我能随时伪装新身份 我就是一个做白事的 流落荒岛的那些事 和孕52宝宝是什么样子 给新幼儿宝宝可以吮痧 给宝宝摸背好不好 给宝宝吃了6天扑尔敏 果蝇叮宝宝了怎么办 刚宝宝整夜没怎么吃奶 给宝宝摸背好不好 给宝宝起名好难 和宝宝睡觉的表情包 给宝宝喂碳酸钙就吐 刚满月的宝宝吃金双歧 刚满月的宝宝吃金双歧 好大夫宝宝发烧 给新幼儿宝宝可以吮痧 给宝宝生辰八字取名字 国外8个月宝宝补什么钙 红心火龙果 宝宝拉肚子 和孕52宝宝是什么样子 荷叶能治宝宝痱子吗 给宝宝虾皮的做法大全集 股癣 传染宝宝 给宝宝虾皮的做法大全集 荷叶能治宝宝痱子吗 给宝宝煎中药方法 怀男宝宝累还是女孩累 果粒橙宝宝感冒能喝吗 和孕52宝宝是什么样子 荷叶能治宝宝痱子吗 荷叶能治宝宝痱子吗 和宝宝睡觉的表情包 给宝宝吃了6天扑尔敏 股癣 传染宝宝 关于宝宝哭百天 给宝宝生辰八字取名字 好大夫宝宝发烧 国外8个月宝宝补什么钙 红心火龙果 宝宝拉肚子 给宝宝生辰八字取名字 怀男宝宝累还是女孩累 给宝宝摸背好不好 刚满月的宝宝吃金双歧 刚宝宝整夜没怎么吃奶 给宝宝喂碳酸钙就吐 给宝宝虾皮的做法大全集 荷叶能治宝宝痱子吗 果蝇叮宝宝了怎么办 给宝宝拍嗝什么时候拍 刚满月的宝宝吃金双歧 给宝宝起名好难 过敏宝宝怎么断奶 亚星官网 亚星官网 亚星官网 亚星官网 亚星游戏官网 万军 抗天 我在大宋卖报纸 从假太监到真皇帝 异界元素 争霸 仙绝神途 AG真人 欧博官网 亚星游戏官网 AG真人 百家乐官网 给宝宝生辰八字取名字 刚满月的宝宝吃金双歧 荷叶能治宝宝痱子吗 过敏宝宝怎么断奶 果蝇叮宝宝了怎么办 刚满月的小宝宝爱哭闹 和宝宝睡觉的表情包 给宝宝起名好难 给宝宝吃了6天扑尔敏 给宝宝喂碳酸钙就吐 好大夫宝宝发烧 和孕52宝宝是什么样子 果粒橙宝宝感冒能喝吗 给宝宝吃了6天扑尔敏 过敏宝宝怎么断奶 果粒橙宝宝感冒能喝吗 刚满月的宝宝吃金双歧 过敏宝宝可以吃醋吗 给宝宝虾皮的做法大全集 给新幼儿宝宝可以吮痧 给宝宝拍嗝什么时候拍 过敏宝宝怎么断奶 国外8个月宝宝补什么钙 荷叶能治宝宝痱子吗 和孕52宝宝是什么样子 果蝇叮宝宝了怎么办 给宝宝煎中药方法 关于宝宝哭百天 给宝宝喂药不吃怎么 海绵宝宝失眠图片大全