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
手机下载浏览器如何屏蔽广告软件win7松下plc软件驱动ps橡皮擦软件下载canon废墨清零软件下载电子教室管理软件价钱手机下载浏览器如何屏蔽广告软件3d制图软件破解版下载ps橡皮擦软件下载word内容解除软件快玩游戏软件caj文字件提取的软件手机下载浏览器如何屏蔽广告软件usb线 编程器软件下载caj文字件提取的软件ps橡皮擦软件下载快玩游戏软件视频软件调清晰度绝地求生高清软件补丁绝地求生高清软件补丁借钱什么软件好用打开软件reader绝地求生高清软件补丁歌曲速度自动分析软件少儿音标软件下载电子教室管理软件价钱挡人脸的p图软件是什么canon废墨清零软件下载学校电子收据软件红包雨下载的软件怎么签到usb线 编程器软件下载 赵全,应用化学及治金双料硕士,毕业后学无所用,无房无车无女友,穿越后遂为赵瑔,江西铅山赵家庄里正之子,时逢南宋末年,宋廷上下偏安一隅苟且偷安,赵瑔以所学创业,引领宋人时尚风标,一步跨入富豪行列,计划趁大宋终结前乘船下南洋占个地方做“南阳村长”赵家庄之福引来盗匪垂涎,赵瑔不得不自建民团以自保,前世宅男从无逐鹿天下的雄霸之心,以“草根”为荣,但世事难料,为获取心仪女孩青睐,赵瑔剽窃伟人诗词以“才子”之名不胫而走,高薪聘请工匠得“奢遮小官人”褒誉。锲而不舍想泡美艳无双的白莲教天母,率民团连破白莲教数城。白富美愿以身相许,赵瑔大手笔招揽安置流民,大举开拓宝岛台湾。葛皂山灵宝天尊到场“以客座首席长老”礼待,朝廷封赐忠武节度使”,当赵瑔一步步被罩上光芒四射的主角光环时该何去何从?率领武装到牙齿的龙神军暴们下南洋占地当村长?指挥天下无二的强大帆舰称霸四海殖民东西半球?还是挥师北上笑看火枪对决弓马?在这个世上活着的人,都有两面,笑脸下藏着恶魔,只是在刹那瞬间的爱也会转换成怨恨,而所有的怨恨会让这个世界血流成河,一寸前是黑暗,回头看也是黑暗,但是这样的黑暗,是谁也没有看到。而我所讲得故事,只是茶余饭后的闲话,您可千万别当真是一个充满在神秘色彩中的反正义跨国杀手组织,故事由一起轰动全国的庞大组织杀人案的曝光引发,反正义和正义与之抗衡。绝望与救赎依偎,死亡与生机共线 人类与厉鬼共舞,善良与邪恶共眠 唯有灵异诅咒,方可对抗恶鬼 赵风穿越秦朝成为了始皇帝的第七子,嬴子歌! 原以为远离咸阳便能躲避灾祸,但赵高却找上门,好在系统如愿开启。 【神选一:接受始皇召令,卸下兵权,立即启程返回咸阳。】 【神选二:拒接始皇召令,立刻起兵,自立为王!】 【神选三:接受始皇召令,立刻回都,向始皇索要太子位!】 面对选择,嬴子歌选择了去向嬴政要太子之位。 至此,暴揍胡亥、疯斩徐福、莽破匈奴、凶伏百越..... 蒙恬:报始皇帝陛下,太子殿下率兵诛杀了匈奴二十万。 嬴政:...... 章邯:报始皇帝陛下,太子殿下已经诛杀了六国叛徒,这是刘邦与项羽的人头。 嬴政:...... 现代青年张无忌一次考古中,意外发现一座古墓。在古墓的神奇力量之下,竟来到了倚天之中的元朝末世。身怀北冥神功,逍遥传承,且看他如何在这个世界掀起风云,红颜相伴,兄弟相随,开辟出一个煌煌盛世! 注:本书单女主,不喜勿入!我在大世界冯宇熙生活在精灵世界,这里有各种神奇的精灵,等你来收服石灵日久变成一个玉梅树,不断因为各种各样的情况,死亡,穿到另一个新世界。逐渐变强修炼。五百年宇宙爆发了一股庞大的特殊能量,将世界各处不同一地点,不同时间的人聚集到了一处空间,在这里它被人们称之为极度领域,有一个名卫的组织隶属于七星主神的麾下,守卫极度领域的秩序。 直到五百年后的今天,宋萧的出现彻底改变了该空间的运行轨迹。
军临城下之护卫者计划 玄幻:四域神尊 你不能死 不朽神台 天赐神机 武灵霸主东方晋 大明风云之锦衣镇山河 盗墓笔录! 末世:坏孩子军团 百厄除尽我都市最强捉妖人 风流狂兵俏天骄 雨做的风 黑夜安魂曲 老婆,我真是一个凡人! 原子战神 苍宇彼岸 生化危机之虐杀原型 大帝的脚是真的臭 我在异世开荒种田 试问青天 在线文字扫描识别软件 网页扣字软件 视频软件调清晰度 绝地求生高清软件补丁 在线文字扫描识别软件 扫描仪看图软件 什么软件元件库最全 m4a音频修复软件下载 挡人脸的p图软件是什么 usb线 编程器软件下载 歌曲速度自动分析软件 歌曲速度自动分析软件 少儿音标软件下载 快玩游戏软件 北京软件经销商 电子教室管理软件价钱 什么软件元件库最全 挡人脸的p图软件是什么 打开软件reader 手机下载浏览器如何屏蔽广告软件 网页扣字软件 ps橡皮擦软件下载 win7松下plc软件驱动 快玩游戏盒软件 m4a音频修复软件下载 少儿音标软件下载 挡人脸的p图软件是什么 win7松下plc软件驱动 打开软件reader 挡人脸的p图软件是什么 绝地求生高清软件补丁 网页扣字软件 canon废墨清零软件下载 手机下载浏览器如何屏蔽广告软件 少儿音标软件下载 电子教室管理软件价钱 多媒体教学系统上网控制软件 什么软件元件库最全 少儿音标软件下载 多媒体教学系统上网控制软件 电子教室管理软件价钱 汉王文字识别软件识别不了 借钱什么软件好用 网上有没有看字典的软件下载 快玩游戏盒软件 网页扣字软件 歌曲速度自动分析软件 canon废墨清零软件下载 红包雨下载的软件怎么签到 3d制图软件破解版下载 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 请叫我刘皇叔 人在修仙:批量制造绝世天骄 横推玄幻:我靠模拟无限升级 梦回大宋之我是宋太祖 元宇宙:大敌当前 欧博官网 亚星管理平台 澳门葡京游戏官网 欧博游戏官网 亚星管理平台 电子教室管理软件价钱 多媒体教学系统上网控制软件 视频软件调清晰度 canon废墨清零软件下载 快玩游戏盒软件 3d制图软件破解版下载 caj文字件提取的软件 少儿音标软件下载 快玩游戏软件 少儿音标软件下载 win7松下plc软件驱动 红包雨下载的软件怎么签到 usb线 编程器软件下载 手机下载浏览器如何屏蔽广告软件 usb线 编程器软件下载 打开软件reader 3d制图软件破解版下载 usb线 编程器软件下载 少儿音标软件下载 有识别图片文字的软件吗 网上有没有看字典的软件下载 扫描仪看图软件 网上有没有看字典的软件下载 3d制图软件破解版下载 word内容解除软件 快玩游戏盒软件 ps橡皮擦软件下载 网页扣字软件 在线文字扫描识别软件 歌曲速度自动分析软件