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
神犬小七演电视剧全集乡村爱情1全集电视剧大贪官和?|电视剧优酷央视国家任务电视剧袁泉刘烨电视剧神犬小七演电视剧全集妈祖电视剧中所有的歌曲大贪官和?|电视剧优酷女医生体检男人电视剧女牧师电视剧庄濠全的电视剧大贪官和?|电视剧优酷疯狂天后 电视剧下载免费古剑奇谭电视剧全集未删减版电视剧周碧云女牧师电视剧电视剧雕刻时光分集介绍绝地苍狼电视剧绝地苍狼电视剧领养电视剧哪一集相认电视剧山东人一郎绝地苍狼电视剧女医生体检男人电视剧韩国爱情电视剧国语袁泉刘烨电视剧向日葵怎么控制电视剧在线观看电视剧《解放》韩国爱情电视剧国语领养电视剧哪一集相认疯狂天后 电视剧下载免费宋帝都临安府爱国人士:吴俊振,与用时光机穿越过来的现代大学生:马维,两人一起被龙卷风漩涡黑洞带着,穿越到了明崇祯十六年公元1643年兴都留守司显陵卫境内,在机缘巧合之下他们俩主动应征入伍参军,从此开启一段帮助大明帝国收复失地的旅程,本文群号799968110中星历1716年,太白和奥莉伴随天地间九彩虹光诞生,同时也惊动了大批高手甚至是仙神的注意,而无数势力的强者中竟然有很多人认识他们的前世,甚至为此等待了他们万年之久…… 前世的他们,光催耀目,几乎以自己的力量创造了当今世界的格局,面对这个复杂的世界,他们的转世重修能否击破命运的牢笼,成就无上的存在呢? 0260年12月24日平安夜,米国旧铜山首现大批海兽,全城人民无一幸存! 0261年4月23日,北熊国出现6级海兽,全国沦陷! 0262年1月1日,新年第一天,华夏出现10级海兽,代号【饕餮】,华夏沦陷! ...... 0260年1月,华夏战神臣风重生到海兽爆发十一个月前。 他赢得高层信任,将在华夏近两万公里的海岸线上铸起一座钢铁长城! 外媒惊为:东方奇迹! “求求臣战神,打开国门放我们进去!” “我们要呼吸东方没有血腥味的空气!”拥有灭魔血脉的木子余在十六岁觉醒了灭魔血脉之力,从此告别了平凡人生,更因为一次意外,掉落山崖,获得了不死天功传承,打开了更为广阔的一片天地。修士风元出生在一个奇幻的修仙世界。在加入了这个世界的大宗派星云宗后,却发现这个世界面临着危机。他能否带领人族对抗强敌,创建辉煌。这是一个男主立志要成为神一般的骑士的故事,故事中寒怆与女主李雅丹等一行人去寻找七色之心,最初的目的只是为了寻父而已,最后竟发现......正义也许会迟到,但是绝对不会缺席! 男人都要学会自己长大,面对所有荆棘坎坷,只有奋不顾身,勇往直前!能拯救你的,只有你自己! 抖音同号:秋风听雨一座有着历史创伤的繁华都市,一片人心险恶的江湖,一群精明能干的警察,几个盘踞已久的社团,一个曾经大佬的儿子,如何在这波谲云诡、大风大浪中明哲保身?兄弟还是兄弟么?生意还是生意么?爱情还是爱情么?所有的道义、江湖、谋略、情爱,一副关于城市的地下江湖的历史画卷,都在这里慢慢展开......超凡与科技的碰撞,世界正在滑向未知的领域 诡异在呓语,恶神投来了觊觎的目光 有人甘愿献出一切 用生命换来黎明的曙光 这些黑暗中的先行者被称作守夜人 时隔七年,旧日再临 当林深付出一切,斩向那所谓神灵 世界的真实显现在他的眼中 两个宇宙的交汇,一场前所未有的大世 异界之旅?得窥大道? 一切的一切指向终焉 真正的漫漫长夜将临 是否能博得破晓黎明?前世身为妖婆大弟子享受一切修仙资源,因飞升未成受三世凄惨轮回,老妖婆子逆天改命寻找转世宿主,我的人生开始转变,一切的一切他都不放在眼里,只为夺回属于他的所有回到老妖婆子身边。
七星玄阵师 骷髅领主的成长日记 白鹿源起 野火一卷 年少复仇记 沧灵大陆 今后,我来决定勇者的道路 修吾记 大唐最牛纨绔 斗神传说:七星 大秦:我能召唤万物 双龙剑侠 剑歌长行 溪鱼草记 禁忌收容所 网游:风入神州 开局选了恐龙族 死亡诞生序曲 非正常异界录 诛天苍穹 疯狂天后 电视剧下载免费 电视剧的雪山飞狐 绝地苍狼电视剧 韩国爱情电视剧国语 疯狂天后 电视剧下载免费 妈祖电视剧中所有的歌曲 古剑奇谭电视剧全集未删减版 大贪官和?|电视剧优酷 沃拉娜特·旺萨莞电视剧 央视国家任务电视剧 美国科幻电视剧异形入侵 庄濠全的电视剧 李元霸电视剧有几部 神犬小七演电视剧全集 电视剧山东人一郎 人的脚丫的电视剧 李元霸电视剧有几部 向日葵怎么控制电视剧 胜利拍的电视剧 大贪官和?|电视剧优酷 美国科幻电视剧异形入侵 电视剧周碧云 乡村爱情1全集电视剧 古剑奇谭电视剧全集未删减版 女牧师电视剧 长征电视剧mp4 向日葵怎么控制电视剧 乡村爱情1全集电视剧 胜利拍的电视剧 向日葵怎么控制电视剧 袁泉刘烨电视剧 庄濠全的电视剧 央视国家任务电视剧 神犬小七演电视剧全集 韩国爱情电视剧国语 袁泉刘烨电视剧 央视国家任务电视剧 电视剧雕刻时光分集介绍 长征电视剧mp4 电视剧周碧云 在线观看电视剧《解放》 封神榜温碧霞电视剧 电视剧的雪山飞狐 李元霸电视剧有几部 古剑奇谭电视剧全集未删减版 美国科幻电视剧异形入侵 辽宁都市2016的电视剧 在线观看电视剧《解放》 长征电视剧mp4 妈祖电视剧中所有的歌曲 亚星官网 亚星游戏官网 亚星游戏官网 亚星官网 亚星游戏官网 元宇宙天宫 女帝师尊,让我喊她媳妇? 墨羽笙箫传 天下一族 空间传说之能量风暴 亚星管理平台 亚星官网 万利游戏官网 亚星管理平台 澳门葡京官网 韩国爱情电视剧国语 沃拉娜特·旺萨莞电视剧 李元霸电视剧有几部 人的脚丫的电视剧 辽宁都市2016的电视剧 妈祖电视剧中所有的歌曲 电视剧山东人一郎 古剑奇谭电视剧全集未删减版 大贪官和?|电视剧优酷 庄濠全的电视剧 乡村爱情1全集电视剧 女医生体检男人电视剧 乡村爱情九电视剧免费观看 大贪官和?|电视剧优酷 人的脚丫的电视剧 乡村爱情九电视剧免费观看 沃拉娜特·旺萨莞电视剧 向日葵怎么控制电视剧 领养电视剧哪一集相认 袁泉刘烨电视剧 领养电视剧哪一集相认 人的脚丫的电视剧 神犬小七演电视剧全集 李元霸电视剧有几部 电视剧山东人一郎 辽宁都市2016的电视剧 央视国家任务电视剧 电视剧的雪山飞狐 央视国家任务电视剧 马丽演过的电视剧