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
邮票 李富春2006年邮票价格t48邮票图片邮票山西民居十大元帅 邮票邮票 李富春遵义会议25周年邮票价格t48邮票图片j18 邮票猴邮票值多少钱日光岩个性邮票t48邮票图片猴年邮票的简介日光岩个性邮票t48邮票图片扇面邮票发行量2001年蛇年邮票册中国普六邮票十大元帅 邮票林伯渠同志诞生一百周年邮票多少钱1988 j151邮票中国普六邮票j18 邮票中华人民共和国邮票2012朱仙镇年画邮票j163邮票朱仙镇年画邮票2014年中华人民共和国邮票林伯渠同志诞生一百周年邮票多少钱李可染作品选邮票林逍重生,这一世,他要成为十方至尊。 绝世的丹药随手炼制,罕见的异兽乖乖收服。 守护家人是他心愿,不断变强报仇雪耻是他的目标。 这是一个强者陨落的重生路,若触逆鳞,不管是何方神圣,定让你灰飞烟灭!内容提要:推荐新书《神魔霸体》http://www.17k.com/book/705692.html天地六界,远古鸿蒙。一个卑微的小人物毕凡,一步步修炼成长。闯魔域煞气冲天、战潜龙一鸣惊人、闯天下成就威名、夺宝库独占鳌头、入混沌翻云覆雨、踏六界唯吾独尊、斗鸿蒙逍遥至尊。动乾坤、踏六界、斗苍穹、破鸿蒙,诛仙逆天成就六道仙尊。爱恨情仇、兄弟义气、刀光血影,无穷无尽的宝物、灵兽、功法,尽在《六道仙尊》。喜欢的请加群:云霆飞书友群:177856368 YY频道ID:53771214 YY群:3209667大家点击作者笔名进去,记得‘崇拜下’、‘留脚印’、‘打酱油’,每天一个号都可以点击一次。谢谢!!推荐两本书《特工教师传奇》《重生之官路高升》一天晚上我的小女朋友想要我打电话给她讲故事,于是我便随口编纂了一个关于熊猫的故事,可没曾想第二天早上我竟变成了一只熊猫!!!在这之后我作为一只熊猫称霸世界的传奇故事就开始了......在这个世界,有一片大陆名叫普光大陆。 天地间充斥着命之气,每个生物都会觉醒命纹,命纹,是每个生物的强大的基础。 少年巧遇机缘,首次觉醒前所未有的三属性先天灵智命纹!肩负命之兽口中相言的“救世主”之责任。 与命纹配合,共创强大命技;闯重装之谷,打造出成长形神兵。 ...... 何虑万世,我终当隆逢,吾辈同体,我辈同源,自有异理,故吾终当一战,此亦吾身为宿命。 双子临世,自命初之源;续报重求,为如初!秦恒生?害人害己的家伙。   为什么上了年纪的人都喜欢坐在那儿发呆?他!也向往光明。黑暗的尽头那不存在的光明。本书又名【大明:我人皇的身份被女帝曝光】。 绝世凶人朱厌,穿越到历史爽文《大明劫》中,成为存在感微弱的配角。 他本想安稳度日,跟着书中主角团队吃香的喝辣的,结果被迫绑定系统,拯救濒临毁灭的大明皇朝。 狗作者……你干得是人事儿吗?挖坑不填我就不说了,居然还太监? 现在轮到这些坑都要我解决……你妹!!!还俗的高僧王元陵,在去好友葬礼的路上,遇上了一个奇怪的少年,从此,一块以关中为目标的巨大鬼局的幕布拉开了,八百里关中平原和平安宁的表象下,暗流开始涌动……当修真者穿越到了现代,因为语言不通闹出了许多笑话。 谁能想到,一个不起眼学生竟然是修真界的最强者? 最强S级异能者?对不起,只需要一剑。 异能者和修真者的碰撞,核武和仙术的对轰…… 就像书名上写着的,你加载了危险游戏。 总之我得,在游戏正式开始前,给你个忠告。 呃,没错,说得就是屏幕前满脸不在乎的你... 在这里! 你不该相信任何人! OK!就这样... 总之不论你是谁,在哪里,请相信我,在看到这里的时候,你已经被卷入进了这场危险的游戏当中! 你可以试着回头,可以盯住屏幕,可以闭上眼睛... 但不论你怎么做,它们就藏在你身边,或许是卧室的床下面,或许是卫生间的镜子里(谁知道呢,它们的喜好向来与众不同)。 呃... 该死—— 它们发现我了! 看来我只能送你到这里,下面的路,你得靠自己走了! 还记得我最初说过的吗? 不要相信任何人! 包括... 从床底下朝你伸出手的我!什么?练气一层!!! 不可能的 !这绝对不可能! 他一定是装的,我就喝了他一杯茶现在能吊打大罗金仙? 还有两句话,我讲完就下课,没听懂? 下课问同桌,不要耽误大家时间! 就这样的成绩,你们说好意思不?你们是我带的最差劲的一届。 你们可不要到处说是我的徒弟。 大闹天宫就是你们的毕业考核了,排好队,一个一个来,谁也别想溜,不过的留级!听明白了没有? 圣人?是楚中天师父教出来的吗? 不是?那你还敢说是自己是圣人? 你知道事物是怎么发展的吗? 你懂矛盾的辩证统一关系吗? 你知道对立统一规律吗? 你知道量变质变规律吗? 你知道否定之否定规律吗? 这都不知道!肚子里一点货都没有。 啥也不是!啊!呸! 想跟中天师父学道后面领号排队去。 插队!还有没有素质?(╬◣д◢) 作品链接:https://h5.17k.com/book/3395121.html
妖族聊天群:我真不是奸商啊 血色的路途 不灭天星 都市!完美校花都是我的 野火一卷 从勾栏开始 诡异猎人 成魔之殇之狂魔来临 聂都后裔 绝影刺客 风都再面黑暗之时 灵魂塔之天门 新奥特列传欧布捷德赛罗 中天稗史 修仙原来这么简单 斩彦 风雪纵亭茗 我老婆是快穿文女主 长生卷宗 一个疯子和他的幻想 2001年蛇年邮票册 t48邮票图片 2004年邮票方联册 林伯渠同志诞生一百周年邮票多少钱 2001年蛇年邮票册 中国编号邮票 扇面邮票发行量 邮票山西民居 韩熙载夜宴图邮票尺寸 十大元帅 邮票 关于马年的邮票简单一些 猴邮票值多少钱 j18 邮票 桃花邮票的市场价格行情 2006年邮票价格 8分邮票图片 扇面邮票发行量 韩熙载夜宴图邮票尺寸 李可染作品选邮票 j163邮票 t48邮票图片 34届全国最佳邮票评选纪念 遵义会议25周年邮票价格 2006年邮票赠送狗小版价格 桃花邮票的市场价格行情 j18 邮票 韩熙载夜宴图邮票尺寸 遵义会议25周年邮票价格 李可染作品选邮票 韩熙载夜宴图邮票尺寸 8分邮票图片 t48邮票图片 中华人民共和国邮票2012 j163邮票 邮票设计大赛图片 8分邮票图片 2014年中华人民共和国邮票 扇面邮票发行量 j18 邮票 2014年中华人民共和国邮票 8分邮票图片 朱仙镇年画邮票 动物邮票资料 中国编号邮票 日光岩个性邮票 2004年邮票方联册 邮票设计大赛图片 朱仙镇年画邮票 8分邮票图片 2001年蛇年邮票册 亚星官网 亚星游戏官网 亚星官网 亚星官网 亚星官网 御魂擎天 绑官记 异元新生 爱丽丝在1918 巅峰之武道无双 澳门葡京官网 AG真人 欧博官网 澳门葡京官网 欧博官网 中华人民共和国邮票2012 2014年中华人民共和国邮票 2004年邮票方联册 中华人民共和国邮票2012 2006年邮票赠送狗小版价格 日光岩个性邮票 邮票 李富春 8分邮票图片 桃花邮票的市场价格行情 j18 邮票 李可染作品选邮票 1988 j151邮票 朱仙镇年画邮票 t48邮票图片 十大元帅 邮票 李可染作品选邮票 日光岩个性邮票 十大元帅 邮票 中华人民共和国邮票2012 中国普六邮票 扇面邮票发行量 中国编号邮票 猴邮票值多少钱 日光岩个性邮票 猴年邮票的简介 2006年邮票赠送狗小版价格 t48邮票图片 邮票 李富春 遵义会议25周年邮票价格 关于马年的邮票简单一些