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 as part of Bootstrap is a 940px-wide, 12-column grid.

It also has four responsive variations for various devices and resolutions: phone, tablet portrait, table landscape and small desktops, and large widescreen desktops.

<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

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="span12">
    Level 1 of column
    <div class="row">
      <div class="span6">Level 2</div>
      <div class="span6">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>
Variable Default value Description
@gridColumns 12 Number of columns
@gridColumnWidth 60px Width of each column
@gridGutterWidth 20px Negative space between columns
@siteWidth Computed sum of all columns and gutters Counts number of columns and gutters to set width of the .container-fixed() mixin

Variables in LESS

Built into Bootstrap are a handful of variables for customizing the default 940px grid system, documented above. All variables for the grid are stored in variables.less.

How to customize

Modifying the grid means changing the three @grid* variables and recompiling Bootstrap. Change the grid variables in variables.less and use one of the four ways documented to recompile. If you're adding more columns, be sure to add the CSS for those in grid.less.

Staying responsive

Customization of the grid only works at the default level, the 940px grid. To maintain the responsive aspects of Bootstrap, you'll also have to customize the grids in responsive.less.

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>

Responsive devices

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: 768px) { ... }
// Portrait tablet to landscape and desktop
@media (min-width: 768px) and (max-width: 980px) { ... }
// 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 hidding 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

Test case

Resize your browser or load on different devices to test the above clases.

Visible on...

  • Phone✔ Phone
  • Tablet✔ Tablet
  • Desktop✔ Desktop

Hidden on...

  • Phone✔ Phone
  • Tablet✔ Tablet
  • Desktop✔ Desktop
枪男男头像图片大全2015可爱看微信头像炫舞动态污头像图片男士性冷淡头像闺蜜头像一对两张动漫萌枪男男头像图片大全2015拿枪的女生头像紫色炫舞动态污头像图片头像微信个性搞怪头像卡通头像男士头像写真红警4头像炫舞动态污头像图片基佬头像一对卡通戴蓝色棒球帽的女生头像动态头像百家姓男士头像写真头像漫画女生黑暗运动微信头像的图片2015款运动微信头像的图片2015款有趣小孩头像图片大全好看qq动态头像运动微信头像的图片2015款头像微信个性搞怪头像卡通头像夏季微信头像小清新闺蜜头像一对两张动漫萌有没有第三者头像圆头像在线制作带字夏季微信头像小清新有趣小孩头像图片大全基佬头像一对卡通深居野林神秘老道,一手培养出七位足矣撼动华夏的绝美女徒弟。今日,又一名最小男徒儿罗峰顺利出山。 罗峰:“我是老逼灯培养出最垃圾的徒弟,没什么本事,就想吃吃软饭,苟且度过这一生。” 师父:“什么,他说他最弱?难道我没有告诉过你们,那小子身怀诡秘?” 师姐:“我好像发现我们的小师弟越来越不对劲儿了,为什么世界各大强者都来跪舔他?” 一位来自于世界黑暗深处的顶级势力后裔之子,出生便被抛弃做弃子,偶遇华夏旧时代战力天花板老疯子和七位倾城倾国的大背景七位师姐,从此掌握七大绝学误入都市豪门,卷动江湖风云,走上自证强者之路。俯仰天地,唯我超然! 天道,人道,命道,因果道,人间万道,我由我道! 天邪,人邪,神邪,妖魔邪,天下万邪,唯我无邪!格洛斯特国在2100年创造出了第一批抗侵略的机甲武器,效果十分显著,不仅抵挡住了其他国家的侵略还收复了之前战败的边境地区,在这之后,其他国家也纷纷效仿格洛斯特国舍弃了对普通的枪械和炮弹的研究,也转向研究并创造出了机甲武器,世界爆发了机甲时代战争,战争依旧没有停息,格洛斯特国在2108年秘密打造出了约5m的由人类为载体的新型可作战机甲,但由于驾驶员的大脑活跃度和反应速度的年龄有着过高的要求,军方要求由25岁以下16岁以上的全部非贵族国民必须要参军,因此有大部分的高中生和大学生也必须参军,本是该好好享受青春的年纪却要被迫于战争和死亡为伍,本应握着笔的手却握着机甲操纵杆,战争是残酷且不公的,一群背负保卫国家使命的少年们啊,为了自己想守护的东西而苟延残喘的活下去吧!我有毒,别碰我!我眼瞎,别逼我睁眼!我之毒,无人可解,我之眼,可判生死阴阳! “叮咚,任务完成,获得彩票一张。”   “叮咚,任务完成,宿主收购第一家公司,获得房产抵消劵。”   “叮咚,任务完成,宿主第一次打赏女主播,获得勘破美颜术。”   本是一个在社会摸爬滚打的屌丝,一张病情通知单彻底将他打下地狱,一朝得到神豪财富系统,从此走上人生巅峰。什么叫管家? 管家就是有家的都归我管。 诡怪有没有家? 有家?有家那就归我管! 什么,你说有的诡怪没有家? 那就打到他承认自己有家。九五后小县城协理员高煌在一次拍摄风景时偶尔入梦,结果在梦里获得了一座古老的神庙。通过这座神庙,高煌每一次在梦里都能垂钓上来不同的改变他命运的东西。那么,高煌会通过这座神庙,能让他的生活有什么变化? 而这座神庙的背后,又隐藏了什么故事? 请打开这本书,让我们踏上一段不同于他人的美好旅程! 仙界,所有修道者的理想之地。哪里有着怎样的生活,是否可以无忧的生存?最强者之子,出生便遭遇灾劫,最终他们历经坎坷、生死离别,与一群志同道合之人改变仙魔两界。新晋重点高中的高一新生,本来想安安稳稳地度过高中三年,怎奈生活中插曲不断,看来想低调都难了... 老师眼中的好好学生、同学眼中的理科学霸、他班学生眼中的噩梦、家长口中别人家的孩子... 等等,这些都是在说我吗?我就是一素人啊 农村小伙秦天继承太乙神针,身怀失传古医术,被誉为一代天医, 从此他时来运转,纵横天下。  “神医,首富已经在门外等了你几个小时了,什么时候给他看病?”   秦天躺靠美人怀,摆摆手说道:“让他等着……”
风雨有晴归去来 坦途锦衣 我的玄幻模拟器 修吾记 修仙:从给爷爷烧纸开始 洪荒之飞舞的蒲公英 恶龙?不存在! 阿怪新传 半州风云 吾即是道 轩盏龙炎 斩天丹帝 回到明朝当藩王 蚀刻符印 变成魔王也要拯救世界? 开局卡Bug,偷听鬼怪心声 死亡盗寂时 黑夜后的光明 来自幻想世界的客人 大美宝鸡 可爱的成熟的头像图片大全集 霸气女图背影头像 头像漫画女生黑暗 闺蜜头像一对两张动漫萌 可爱的成熟的头像图片大全集 qqpp头像男生 头像漫画女生黑暗 个性头像贝克汉姆 有没有第三者头像 简约的女生手绘头像唯美图片 头像微信个性搞怪头像卡通头像 2017qq情侣头像动漫呆萌 来桃花头像图片大全 霸气女图背影头像 枪男男头像图片大全2015 闺蜜头像一对两张动漫萌 笔画拽脸皮卡丘情侣头像 有没有第三者头像 欧美大胡子气质头像男 炫舞动态污头像图片 霸气女图背影头像 动态头像百家姓 可爱看微信头像 戴蓝色棒球帽的女生头像 男士头像写真 来桃花头像图片大全 有没有第三者头像 可爱看微信头像 欧美大胡子气质头像男 有没有第三者头像 闺蜜头像一对两张动漫萌 红警4头像 男士性冷淡头像 枪男男头像图片大全2015 夏季微信头像小清新 闺蜜头像一对两张动漫萌 男士性冷淡头像 头像漫画女生黑暗 来桃花头像图片大全 动态头像百家姓 圆头像在线制作带字 简约的女生手绘头像唯美图片 背叛头像 笔画拽脸皮卡丘情侣头像 戴蓝色棒球帽的女生头像 霸气女图背影头像 2017qq情侣头像动漫呆萌 圆头像在线制作带字 来桃花头像图片大全 拿枪的女生头像紫色 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 大起大落的鬼畜人生 原体:初现 2020回忆录 小公爵的意外玫瑰情人 空无是实有,无尽的妙用 澳门葡京游戏官网 葡京官网 AG真人 澳门葡京游戏官网 万利官网 闺蜜头像一对两张动漫萌 夏季微信头像小清新 简约的女生手绘头像唯美图片 简约的女生手绘头像唯美图片 背叛头像 枪男男头像图片大全2015 qqpp头像男生 闺蜜头像一对两张动漫萌 炫舞动态污头像图片 个性头像贝克汉姆 头像漫画女生黑暗 来桃花头像图片大全 男士性冷淡头像 带陈字的人物头像 背叛头像 头像微信个性搞怪头像卡通头像 夏季微信头像小清新 夏季微信头像小清新 简约的女生手绘头像唯美图片 简约的女生手绘头像唯美图片 有趣小孩头像图片大全 背叛头像 有没有第三者头像 夏季微信头像小清新 枪男男头像图片大全2015 动态头像百家姓 戴蓝色棒球帽的女生头像 2017qq情侣头像动漫呆萌 有没有第三者头像 带陈字的人物头像