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
有什么软件可以查电话号码机主姓名mg2580清零软件清零企查查 软件违法吗ipad上哪个软件看直播软件狸窝ppt转换器软件帐号密码有什么软件可以查电话号码机主姓名ios11总是软件闪退企查查 软件违法吗打印1寸2寸照片的软件下载游戏出招软件手机视频有个兔兔是什么软件企查查 软件违法吗adobexd软件破解版下载手机视频有个兔兔是什么软件战舰世界外挂软件游戏出招软件寸相打印软件下载直播的自动点歌软件下载直播的自动点歌软件下载能在附近约会聊天软件教育培训财务管理软件直播的自动点歌软件下载打印1寸2寸照片的软件下载用什么软件调烟雾狸窝ppt转换器软件帐号密码mac arena软件小学生 汉字 软件 人教版用什么软件调烟雾能在附近约会聊天软件adobexd软件破解版下载唐轩只是一个普通的懵懂大学生,在鼓起勇气告白的这个夜晚,校花的突然来访改变了他平淡的人生。在惊悚与神秘的呼唤下,在爱与死的抉择下,他毅然选择了未知。王座高悬于上,陌生国度的大门向他缓缓开启。平凡的小人物走上不平凡的真理之路。然而王座的前面诡谲重重,当真相解开面纱,唐轩又该如何抉择? 是屠龙的少年终成恶龙,还是……颠覆整个世界。平行世界恐怖游戏降临,全人类笼罩在阴霾之中,苏毅穿越平行大陆,召唤九大鬼王,狂推各类副本。 笔仙:苏毅真的狗,跟几只鬼王把我通灵出来,笔被他折断,换成了电笔。 贞子:我正从电视往外爬呢,苏毅的鬼王就把我电给拔了,卡在电视当间不说,愣生生扯着头发将我拽了出来。 湘西铜甲尸:苏毅非说我身上的是古董,把我铜甲扒了,要上交国家! 苏毅通关了副本榜所有高难度副本,自此副本里的鬼物抱团取暖。 “坚持下来,活下去!”无上大地破晓陨落他重生到圣后国毫无修为的圣女小姐身上後会发生什麽? 毫无修为的圣女小姐皇权被架空。意外开启圣女系统。 什么我重生竟然变成女的。幸好我有系统。 系统说别得意本系统是不会帮助你的,你还得靠你自己。 坑啊!变成女的就算了给个只能看不能用的系统。那我要你这系统何用。 系统:呵呵只是我觉得你不配拥有本系统。 滚你丫的系统。 就算没有功法没有修为又如何。我定要逆他这个破天。 没有任何金手指在这个以武为尊的世界,何去何从? 且看废物圣女如何震撼天下,开辟出一条逆天之路。 《紫薇真经》内经篇是对中医理论的探索和创新,提出了天干命理辨证分型的新方法,星星之火,可以燎原,希望这一理论研究能振兴没落的中医传统文化,为实现中华民族伟大复兴尽绵薄之力。 东土有一道观,传道天下,却惺惺作态; 西域有一寺庙,普度众生,却暗藏杀机; 南方有一魔窟,看似残暴,却快意恩仇; 北地有一妖山,凶险异常,却古道热肠; 正义不再是正义,邪恶不一定是邪恶,任乾坤颠倒,我只一剑斩之。 丧尸突然在校园出现,校园只剩二百多名同学包括四个校花,我们的主角苏长影会怎么做呢?他会拿下四个校花冲出校园,过上神仙般的生活吗?一位现初二的男学生的真实生活,随便写写,在不高兴的时候可以抒发一下。也请大家支支招,这样最好。  红色玛瑙似的石头、会唱歌的古木、夜半时分龙的低沉的吼叫、以及阴森的密林中的鬼怪……以及他,瘦弱的读书之人,却为何要爱上了一位美艳多情的少女,非常不幸地使自己卷进了万劫不复的纷争之中……   风高月黑之夜,他来了,沉重似铁的脚步声一度使石头颤抖,天上的月轮见了也不得不向他点头哈腰。他是真正的强盗,雄伟的身躯,过人的胆魄,尚且还有狡猾的头脑。杀人无数的他略显苍老,却并没有忘记儿女情长,风花雪月的日子使人不变老。他是少女的梦,少女还有另外一个梦,便是那读书人的眼眸,那是何等清澈的泉水般的眸子啊。狭路相逢,一头是那读书人,一头是强盗低沉的怒吼,刀抽出来了,上面残留着映着月轮的寒冷的血…… 这便是玄域之地,离奇可怕之事所在多有,天空一度呈现不祥之色,红色的雨飘洒在苍老的大地如雪花飞舞…… 人们纷纷逃离,而那位读书人却不能,因为他得保护着那位少女……      最后,读书人发现少女竟然… 这里没有玄幻,没有穿越;只有新活的生命,逻辑的真实。 这是一个虚构的故事;一个关于生意与情怀的故事。一群年轻人,在小说主人翁李非的带领下,历经千辛万苦,克服重重困难,在小城香州,书写了一段商业传奇。香水星河酒店,一个给予了无数客人美好记忆,承载着一群酒店人理想的航器,在到达了它辉煌的顶峰后,突然掉头…… 结果怎么样?为什么会这样?是历史的悲剧,还是人生的释然?——一千个读者就有一千个哈姆雷特——如果你想得出自己的结论,请阅读天界无际的小说《香水星河》。人的命运,得看机遇。 吴晓是一位大学毕业生,可是在这个大学生如白菜一样的年代,毫无背景的他想要找一份好的工作已是不容易,更别提出人头地,有一番成就了。 在一次偶然他遇到了神奇的超级智能系统,从此他的人生发生了翻天覆地的变化。。。
须弥戒内 天元灭魔传 第5纪元 觅路行 长生神帝 SCP基金会事务所 古无 执炬 综武:我在大宋当皇子 我在异世界当农夫 离乡三千里 修罗宁神纪 猛龙走天涯 一片丹心 玄幻:赵高,一步一步往上 我在凡间当鬼差 梁王 末世异能之王 战荒原 荒古吞天诀 hdtunepro 软件 推荐 手机视频有个兔兔是什么软件 税收调查软件 ntss ipad上哪个软件看直播软件 hdtunepro 软件 推荐 那种软件可以造生僻字 ios11总是软件闪退 dvd光盘刻制软件 mg2580清零软件清零 哪个微信投票软件用盟点 思华软件qq好友群发器 寸相打印软件下载 2007的软件 手机视频有个兔兔是什么软件 能在附近约会聊天软件 ipad上哪个软件看直播软件 思华软件qq好友群发器 mac arena软件 hdtunepro 软件 推荐 企查查 软件违法吗 dvd光盘刻制软件 战舰世界外挂软件 mg2580清零软件清零 手机视频有个兔兔是什么软件 游戏出招软件 恒赛特称重软件下载 mac arena软件 mg2580清零软件清零 hdtunepro 软件 推荐 mac arena软件 狸窝ppt转换器软件帐号密码 新浪微博采集软件官网 ipad上哪个软件看直播软件 有什么软件可以查电话号码机主姓名 用什么软件调烟雾 狸窝ppt转换器软件帐号密码 ipad上哪个软件看直播软件 寸相打印软件下载 恒赛特称重软件下载 战舰世界外挂软件 小学生 汉字 软件 人教版 现在聊天用什么软件是什么 鲁班土建软件2015下载 思华软件qq好友群发器 手机视频有个兔兔是什么软件 dvd光盘刻制软件 caa是软件 小学生 汉字 软件 人教版 恒赛特称重软件下载 ios11总是软件闪退 亚星游戏官网 亚星官网 亚星官网 亚星官网 亚星官网 穿越南北朝之寻秦记 我与守护灵 从变天崛起 焚天古神 罪恶神印 百家乐官网 澳门葡京游戏官网 葡京官网 百家乐官网 万利游戏官网 寸相打印软件下载 教育培训财务管理软件 恒赛特称重软件下载 教育培训财务管理软件 思华软件qq好友群发器 mg2580清零软件清零 dvd光盘刻制软件 小学生 汉字 软件 人教版 游戏出招软件 2007的软件 hdtunepro 软件 推荐 2007的软件 小学生 汉字 软件 人教版 恒赛特称重软件下载 2007的软件 思华软件qq好友群发器 恒赛特称重软件下载 有什么软件可以查电话号码机主姓名 手机视频有个兔兔是什么软件 有什么软件可以查电话号码机主姓名 能在附近约会聊天软件 战舰世界外挂软件 打印1寸2寸照片的软件下载 mg2580清零软件清零 hdtunepro 软件 推荐 狸窝ppt转换器软件帐号密码 用什么软件调烟雾 有什么软件可以查电话号码机主姓名 新浪微博采集软件官网 游戏出招软件