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
盐山枣酒价格裹粉牛肉汉堡?V价格四川优品果源坚果价格官网乐视70寸的价格傅青主价格盐山枣酒价格江淮鼎力790价格四川优品果源坚果价格小花瓶价格和天下2罐装茶叶价格广场舞服装价格在35元左右的四川优品果源坚果价格色彩日记价格表广场舞服装价格在35元左右的吴彬画价格和天下2罐装茶叶价格泰安婚礼价格风雅陶笛图片及价格傅青主价格寿饼的价格V I V O 手机X 6全网通价格风雅陶笛图片及价格小花瓶价格高品质夹管阀价格唐青花价格美国挪威小鱼价格唐青花价格高品质夹管阀价格寿饼的价格色彩日记价格表主角李风玉是一个今年刚刚成年的少年,他在父亲的引导下进入期货市场,所有人都没有想到,这个年纪轻轻的少年将在国际金融市场上掀起一阵腥风血雨,将成为自北半球的伦敦金融城到西半球的纽约华尔街无人不知无人不晓的人物.................明朝是一个非常神奇的朝代,神奇在皇帝千奇百怪,神奇在亡国特别突然,国内民不聊生、起义不断,边境后金崛起,不断袭扰,朝中党争不断,将门独大。思宗看似勤俭为民,实则多疑擅杀忠臣,自破长城。悲惨的世界有一群执着的人踏天地,燃道途。破生死,度轮回。血染四方,荒慑八面,我欲立天,动乾坤! 元气大陆,肉弱强食,唯有繁衍到巅峰的元气修行! 少年出自凯云镇,一切从这里开始......。身患绝症的叶文偶得太极拳的真传,并且觉醒了弘扬武学系统! 只要他用武学影响更多人,就能获得积分,兑换顿悟机会,获得各种高阶武学! 甚至,治好自己的病。 从此,叶文开启了他的练武直播! 拳震所有武林宗门,脚踏世间不服之人! 只有你想不到的招式,没有我治不了的高人! 所有人都要恭恭敬敬地,在键盘上叫一声“武神”。 叶文:“货真价实的太极拳要不要学?飞檐走壁的梯云纵要不要了解一下?不要?早晚你要跪地求着我要!”“别人是被炮弹追着轰,我特么是被核弹追着炸!” 核弹灭世之后,主角被迫寻找修道寻仙之路。 然而作为一位修仙小白,遭受修仙门派收徒时的白眼。 “小白!你境界都没有!”守护修士冷眼看了过来。 “没有资格入门。” 可是主角我有金手指啊! “我特别强调一下:打我的时候需要控制力量,不许使用超过一成的力量!” “你们总是不听话!” 安临渊把头仰起,45度朝向天空, “我说不许使用超过一成的力量是在保护你们!” 在凡人地界,核武末世下走投无路的安临渊,迫不得已,被逼入进入阿尔卑斯门,寻求庇护。 安临渊开始走向修仙道路。 即使安临渊已经遁入阿尔卑斯门修仙求道,凡人地界依然未放弃对安临渊的追杀。 安临渊不断遭遇各种追杀。随着修仙境界的不断提升,被追杀的同时,也展开自己的复仇行动。古墓伴生,他们说我是天降灾星,终南山续命,我用十年时间成玄门魁首,而我的一生,却从那纸婚书开始……*****《流浪在仙界》的有声图书已经在喜马拉雅上架了,多谢各位多去关注。*****百里长青穿越到仙界后发现:地球的心法远不如仙界的功法,但地球的武技却远高于仙界的武技。 汉武帝以:“侠者,以武犯禁”为借口,将江湖上的大部分武林高手围剿斩杀。百里长青(原名郭解)和他的八个兄弟,四个婢女,七个徒弟,还有五千个生死兄弟,在卫青大将军的十万大军合围后,全部万箭射杀,最后被仙界大佬救下灵魂穿越到仙界的凡人界,要求他们去仙界完成一个非常重要的任务。 百里长青带着他的兄弟和徒弟在仙界杀进凡人界,仙人界,神界等一个又一个的大陆,破解一个又一个的惊天阴谋,最终尘埃落定! 三世为人,穿越到仙界后百里长青一切看淡,性格大变,游戏风尘,风趣幽默尽在本书中。 世间万物,周而复始;盛衰之源,宿命轮回。数百万年后,地球因资源枯竭引发大战,让曾经的大洲、大洋变成了一块荒凉的大陆,绝大部分陆地在战争中沉入海洋,本以为地球将文明会因此消失在宇宙历史之中,不曾想因上古大战导致外泄的地球内核能量,却奇迹般的让地球生命得以进化。十万年之后,曾经满目疮痍的土地再次以无比宽大的胸襟重新接纳人类。当然也不止是人类……叶浪携【绮罗大陆】系统重生于天罪大陆,并在机缘巧合下加入了镇妖司,成为一名实习镇妖人。 这方世界水太深,他决定先猥琐发育。 于是乎,开小号,换马甲。 他拥有了许多不为人知的身份! 直至某天,真实身份意外暴露,所有人全都瞠目结舌,难以置信…… “导师大人,吾要给你生猴子!” “仙尊请留步!贱妾想率领门下所有女弟子追随左右!” “妈呀,快,快跑,他是传说中的猎妖达人!” “跑有毛用,这方世界有杀阵大宗师布下的超强杀阵!” …… 五方力士,在天为五鬼,在地为五瘟。我叫李殇,师承五瘟使,从我父亲违背祖训的当日,阴差阳错被卷入两方势力争斗的旋涡中心,注定陷入无休无止的杀身大祸当中,为了活下去我变成了一个行走阴阳的摆渡人,真相伴着已逝之人沉埋黄土,拨开历史疑云,遥望过去,恍然惊觉,祸端的起因竟是我自己……
铠甲勇士之宇宙危机 麟溪传 天道五千年 白雪下的蓝天 圣龙传之关中诡事记 一个陌生男孩的来信 毕加索的交流 修仙途漫漫 大能耐赘婿 这就是火之意志 丹经启始 AI:神域进化 拿脚想的剧本都比戴卡强 大焱皇子 漫漫修行刀剑狂 救世与轮回 破解版人生 谷仙诀 修仙:我把九转金丹当糖嗑 剑锋之上人界篇 1.5kg螺旎藻高纤维饼干价格 素烧三管陶笛G价格 泰安婚礼价格 傅青主价格 1.5kg螺旎藻高纤维饼干价格 鱼胶图片价格大全 泰安婚礼价格 2米高苏铁价格 美国挪威小鱼价格 哪里能买到批发价格的真发 多尼克底板价格表 多尼克底板价格表 柿霜糖价格 素烧三管陶笛G价格 盐山枣酒价格 傅青主价格 珠江up118f4价格 美国挪威小鱼价格 国产曲奇饼价格 四川优品果源坚果价格 素烧三管陶笛G价格 四川优品果源坚果价格 国产曲奇饼价格 风雅陶笛图片及价格 和天下2罐装茶叶价格 柿霜糖价格 1.5kg螺旎藻高纤维饼干价格 裹粉牛肉汉堡?V价格 国产曲奇饼价格 美国挪威小鱼价格 傅青主价格 荷花苗出售价格 官网乐视70寸的价格 盐山枣酒价格 高品质夹管阀价格 唐青花价格 官网乐视70寸的价格 泰安婚礼价格 柿霜糖价格 吴彬画价格 唐青花价格 2米高苏铁价格 挡土墙切割价格 珠江up118f4价格 广场舞服装价格在35元左右的 荷花苗出售价格 多尼克底板价格表 唐青花价格 柿霜糖价格 高档婚纱价格 亚星官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 我还是相信科学 彼岸境界 天残补命录 都市最强赘婿系统 尘封游 百家乐官网 欧博游戏官网 欧博官网 万利游戏官网 快连下载 哪里能买到批发价格的真发 高档婚纱价格 1.5kg螺旎藻高纤维饼干价格 泰安婚礼价格 色彩日记价格表 多尼克底板价格表 傅青主价格 荷花苗出售价格 风雅陶笛图片及价格 国产曲奇饼价格 珠江up118f4价格 国产曲奇饼价格 挡土墙切割价格 四川优品果源坚果价格 国产曲奇饼价格 色彩日记价格表 盐山枣酒价格 唐青花价格 官网乐视70寸的价格 高品质夹管阀价格 美国挪威小鱼价格 风雅陶笛图片及价格 高档婚纱价格 多尼克底板价格表 珠江up118f4价格 素烧三管陶笛G价格 柿霜糖价格 四川优品果源坚果价格 和天下2罐装茶叶价格 2米高苏铁价格