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
欧美头像女生伤感图片大全唯美伤感欧美成熟头像女生头像背影图片大全集动漫男生阳光帅气萌头像图片大全动漫男纹身图片大全图片动漫女孩死亡图片大全欧美情侣图片小孩头像可爱头像图片大全可爱七个葫芦娃的图片大全动漫男生阳光帅气萌头像图片大全动漫日常服装图片大全图片动漫女孩胸罩视频大全图片大全图片欣赏动漫女孩图片 忧伤唯美意境图片大全欧美头像女生伤感图片大全唯美伤感七个葫芦娃的图片大全动漫女孩微笑图片可爱图片大全图片头像女生图片大全动漫男纹身图片大全图片瓶子里的女孩的图片大全图片大全图片欣赏凄美动漫少年图片大全动漫女孩图片 忧伤唯美意境图片大全动漫女孩图片 忧伤唯美意境图片大全欧美情侣图片小孩头像可爱头像图片大全可爱动漫美少女足图片大全动漫女孩图片 忧伤唯美意境图片大全欧美标志建筑图片大全图片大全图片欧美男子长发头像图片大全平面动画图片大全图片大全图片欣赏欧美黑白头像女唯美图片大全漂亮衣服漫画图片女生图片大全图片欧美男子长发头像图片大全欧美情侣图片小孩头像可爱头像图片大全可爱七个葫芦娃的图片大全赫赫有名的“白金”成就满级玩家,在删除账号却误入了新的时间,本以为是系统BUG,没想到却在这里开启了新的人生以完美的道构建世界。 完美的道是正是邪、是善是恶?完美的世界又是怎样一番模样?男主顾易意外穿越到大楚帝国,结果身份和现代社会还是一样平民,在大楚帝国一次意外中获得了系统辅助,完成任务直接一路飙升,咸鱼翻身为一大楚帝王。建安十二年,郭嘉病重,生命即将走到尽头。 临死前,郭嘉拉着曹操的手,说出了一个秘密:吾弟郭泰,才能胜吾十倍,可助主公成就霸业! 曹操悲痛之余,三次到访,请郭泰出山,开局便是赤壁之战前夕。 面对诸葛亮草船借箭,郭泰直接送他十万支火箭! 周瑜:诸葛军师,你的十万支箭呢? 刘备:军师,你不是诸葛卧龙?怎么从来没有成功过? 司马懿:丞相为何要灭我满门? 曹操:吾有文政,犹鱼之有水也!前世的歌手李一峰重生平行世界。面对的第一件事竟然是离婚。好吧,好聚好散。 “李一峰你的老婆被人欺负了”。 什么?这能忍?帮助老婆制作专辑横扫歌坛。 “李一峰你的前妻被人称为票房毒药”。 什么?那是剧本不行,关我老婆什么事。帮助老婆夺得影后。 “李一峰,你天后老公的身份要暴露了”。 啊,这是什么时候的事啊! 玄龙大陆,以武为尊。 少年叶平安得到败天武帝的至尊天眼,从一个卑微的蝼蚁,成为至高无上的绝世武帝! 一路上白骨累累,红颜多娇路飘摇,无敌路上太寂寥!我不管你相不相信,反正我就是一个记录者为情所困之人 封林是一个在北京潘家园旧货市场开旧物店的小老板,一次在给店里的老房屋装修的机会,竟然在家里墙壁地下暗格发现一个密室,不太大的密室角落里有着一口上了锁的红色的木箱子,盒子打开后里面有着几样东西,一块巴掌大纯金的腰牌。 一本非常破旧的遁甲巫术古书, 还有着一本记录了很多秘事的明朝古书,还有一张残缺不全的地图,箱子里面藏着很多的秘密,让他知道了自己的家族竟然是一个传奇盗墓家族的后人 从古至今的家族秘密缓缓的被揭开,父亲的突然消失,也与此事有关,是为了寻找哪些传说中的东西。 自己兄弟的回归,退役特种兵赵雷,去追寻着父亲的脚步去寻找那传说中的古遗迹,不得不踏入那些恐怖之地。 入活人的禁区,与僵尸斗法,与活人斗智,有一张尸面的鬼狐仙,荒冢野坟墓里的媚女,害人的白皮千年老狸子,披着美女人皮的行尸走肉,几十年难得一见沉没在海里的幽灵鬼船。 一张残破不全的地图,一截刻满符文的龙骨,到底藏着什么秘密? 清末,重生南洋异国,身为皇明汉裔,勇搏时代浪潮,智斗恶邻列强,复我先祖荣光,兴我华龙血脉,建我盛世邦国,立我汉明神威。
末代变异的世界 皇城那些事 明朝小书生 凰族,唯一神子 我以诗词问长生 前生债 我们一起闯荡的日子 高田寨传纪 拂水龙吟凤梧扬 王二浪的幸福生活 大秦纪 大唐:李二冒充我父亲 我师兄是天道之子 自由勇者的异世界冒险 林大厨的故事 游戏太菜,死后入游戏地狱 大古剑仙 白鲸之梦 灵笼世界 穿越之我有修仙系统 欧美标志建筑图片大全图片大全图片 平面动画图片大全图片大全图片欣赏 瓶字的图片大全 动漫男纹身图片大全图片 欧美标志建筑图片大全图片大全图片 动漫美少女足图片大全 七个葫芦娃的图片大全 动漫女孩微笑图片可爱图片大全图片头像女生图片大全 欧美成熟头像女生头像背影图片大全集 瓶子里的女孩的图片大全图片大全图片大全图片大全 动漫女生闺蜜壁纸高清图片唯美图片大全 动漫女生闺蜜壁纸高清图片唯美图片大全 动漫萌萌女孩的图片大全可爱图片大全 动漫女孩图片 忧伤唯美意境图片大全 欧美男子长发头像图片大全 漂亮的女生动漫图片大全集 七个葫芦娃的图片大全 欧美成熟头像女生头像背影图片大全集 动漫日常服装图片大全图片 欧美女生图片大全唯美图片2015款 平面动画图片大全图片大全图片欣赏 欧美情侣图片小孩头像可爱头像图片大全可爱 女子读书唯美图片大全图片大全图片大全 动漫女孩死亡图片大全 动漫女孩微笑图片可爱图片大全图片头像女生图片大全 动漫萌萌女孩的图片大全可爱图片大全 欧美成熟头像女生头像背影图片大全集 女子读书唯美图片大全图片大全图片大全 动漫日常服装图片大全图片 欧美成熟头像女生头像背影图片大全集 动漫男纹身图片大全图片 平面动画图片大全图片大全图片欣赏 动漫男生阳光帅气萌头像图片大全 欧美女生图片大全唯美图片2015款 动漫萌萌女孩的图片大全可爱图片大全 漂亮的女生动漫图片大全集 欧美头像女生伤感图片大全唯美伤感 七个葫芦娃的图片大全 动漫萌萌女孩的图片大全可爱图片大全 欧美头像女生伤感图片大全唯美伤感 漂亮的女生动漫图片大全集 动漫女孩胸罩视频大全图片大全图片欣赏 欧美可爱孩子高清图片大全可爱图片搜索 七夕钱动态图片大全 动漫女孩死亡图片大全 平面动画图片大全图片大全图片欣赏 动漫女生闺蜜壁纸高清图片唯美图片大全 动漫男生阳光帅气萌头像图片大全 欧美黑白头像女唯美图片大全 七个葫芦娃的图片大全 亚星官网 亚星官网 亚星官网 亚星官网 亚星官网 民进禁忌杂谈 一剑求尊 旁观过客 佣兵1929 圣灵之魄 澳门葡京游戏官网 AG真人 快连下载 澳门葡京游戏官网 欧博游戏官网 欧美标志建筑图片大全图片大全图片 动漫萌版表情图片大全下载 动漫美少女足图片大全 七个葫芦娃的图片大全 漂亮的女生动漫图片大全集 平面动画图片大全图片大全图片欣赏 七夕钱动态图片大全 动漫女生闺蜜壁纸高清图片唯美图片大全 七夕钱动态图片大全 欧美女生图片大全唯美图片2015款 动漫女生闺蜜壁纸高清图片唯美图片大全 女子读书唯美图片大全图片大全图片大全 欧美男子长发头像图片大全 动漫女人死亡图片大全图片大全图片 动漫女孩胸罩视频大全图片大全图片欣赏 动漫美少女足图片大全 动漫男生阳光帅气萌头像图片大全 动漫男纹身图片大全图片 漂亮的女生动漫图片大全集 动漫萌萌女孩的图片大全可爱图片大全 瓶字的图片大全 凄美动漫少年图片大全 动漫男纹身图片大全图片 欧美男子长发头像图片大全 欧美黑白头像女唯美图片大全 动漫女孩微笑图片可爱图片大全图片头像女生图片大全 欧美可爱孩子高清图片大全可爱图片搜索 欧美情侣图片小孩头像可爱头像图片大全可爱 动漫女孩图片 忧伤唯美意境图片大全 欧美头像女生伤感图片大全唯美伤感