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
邮票网第三轮生肖邮票生肖邮票邮票网邮票互动网南京文交所钱币邮票交易中心中国邮票价格表十二生肖邮票邮票收藏价格表奥运邮票当你们正在玩着手机打发时间的时候, 我们正在战斗; 当你们在亲吻恋人的时候, 我们正捍卫你们的一切。 你们生活在一个不可思议的,十分危险的世界。 而我们的工作,就是将其变得可思议,不危险。 我们沉浸于黑暗,但我们守护着光明, 我们不为人所知,但我们至纯至善。 我们以必善之信念,行必要之恶。 虽千万人,吾九死而不悔! ——元宇宙管理局赴死者向你致敬!“那个,学姐,我最近心里总是砰砰的感觉,请问我是不是得什么不好的病了?” “你说的那个砰砰的感觉,在哪里,对谁都是一样的吗?” “嗯,好像就是和同社团的前辈在一起的时候,有这种感觉……” “好!那就去告白吧!” “唉———” 阴阳与金木水火土五行属性的物质组成了宇宙,天地之间,哪怕是时时刻刻都存在着的风和雨,光明与黑暗,甚至是虚空之中那星际之间的引力,实质上也是由阴与阳及金木水火土五行物质的相生相克所产生引起的,宇宙也因此而奥妙无穷!人体也是一个小宇宙,而当人体小宇宙的阴阳与五行属性被激活之后,人体的无穷潜能也会被极大程度的被挖掘出来。“天元”便是一个具有并逐渐被激活了的阴阳与五行属性的全属性灵体,可是他在激活并成长的过程中的坎坷却有诸多的磨难,历经多方磨难并成功修炼成为全属性灵体的过程,这就是你将要看到的内容,敬请欣赏!永安不安!白焰不白!一团苟延残喘的青焰,一个没落门派的弟子,一段埋葬在时间长河的秘史,千年的和平似乎让人们忘记了曾经的威胁,在这诸天星海,万界之族中,苦而弥坚的人族、据高临下的妖族、作壁上观的神族以及……在这万类霜天竞自由中,谁为棋子?谁为棋手?五十年后,奥里雷亚诺:“站在你面前的是,共和国的传奇上校,自由党的精神领袖,永不失败的战争之神,奥里雷亚诺!” 尤尼尔:“站在你面前的是,斗鸡兴起人,传奇神话,香蕉之父,弑神者,失眠大师......你最亲爱的叔叔,尤尼尔!” “还不过来挨打!” (纯土著视角,保证没看过《百年孤独》的同学也能放心食用)九幽。幽深之极地,墟,是一个残破的世界。我要前往那儿,埋葬那儿的魂。徐辰一朝穿越发现自己的的幸运值居然是满的?每次开卡别人白光一片,自己却时时出金,而且几乎都是战斗力又高,颜值又高的美少女?“不是你们也太弱了吧,连我卡灵一击都扛不下来啊!”众人满头黑线,你这幸运值开挂的人别人打得过???塑圣魂,觅长生,热血前行,登仙道!万界领主游戏开启,所有人穿越异世成为一国之君。 但几天之后,大家才悄然醒悟自己将要面临的处境。 藩王作乱,宦官专政,太后垂帘… 在这些势力眼中,国君只不过是任人揉捏的傀儡蝼蚁。 而这并不是演习,稍有不慎,即是亡国换代,身死异世。 好在,梁秋觉醒了帝皇模拟器。 【获得三道帝皇气运,现在开始模拟】 【二月廿二日,你成为一国之君】 【二月廿三日,你励精图治,朝堂之上震展龙威!】 【二月廿九日,被刺客潜入皇宫杀害,你死了】 【模拟结束,可永久保留一道帝皇气运】 …… 当七日后的新手保护期结束时,梁秋望着这败乱朝堂温雅冷笑。 “是时候变天了。”一代仙尊陈子时重生到二十二岁。 上一世,陈子时站在宇宙之巅,却无人相伴。 这一世,重新来过,好好体会这凡尘烟火。 手持一把杀猪刀,斩尽天下不平之事。
南京文交所钱币邮票交易中心 奥运邮票 民居邮票 大龙邮票 邮票收藏 香港回归纪念邮票 欧美群迅雷下载 纪念邮票 香港回归纪念邮票 邮票互动网 邮票市场 奥运邮票 中国邮票 第三轮生肖邮票 十二生肖邮票 纪念邮票 邮票 民居邮票 邮票 上海邮票网 欧美群迅雷下载 世界上第一枚邮票 女幽灵 百度网盘下载 迅雷下载 欧美群迅雷下载 南京文交所钱币邮票交易中心 欧美群迅雷下载 邮票市场 中国邮票价格表 邮票吧 邮票收藏价格表 纪念邮票 邮票行情 邮票价格 纪念邮票 邮票吧 生肖邮票 欧美群迅雷下载 邮票网 邮票网 邮票收藏 特种兵之恋烟火世界仁簧踏马江湖游枕中一梦三国:无双云游散录开局被甩我的神豪系统激活长夜一盏灯元灵法则我有一狗只想打工的我被迫拯救世界问苍天之彼岸花开我本为圣魔魇妖帝新生之力平淡都市生活这就是,现实罪恶行为道衍人间办公窗帘请复制到浏览器打开 仓库服装设备 喷砂机价格 仓库承重一般多少 沙发靠包 大 凤尾花窗帘 货架灯 长沙花桥小区 浴室柜 梳妆台 砖机价格 田园家具 窗帘店如何控制水波质量 上海黄浦九院房价 窗帘培训 杭州西湖搬家公司电话号码 锦州银河广场房价 货架批发 芜湖三山保定新城房价 江西高安房价 立邦漆价格表 铝条板厂家 海螺塑钢门窗价格表 杭州房价跌 快速做水波浪帘头 衣柜门 佛山 卫浴 西安临潼搬家公司电话 懒骨头沙发 浮山前到青岛大学有哪些小区 重庆 好莱客衣柜旗舰店 衣柜定制 现做 上海大众服务电话多少 肥城市内有多少小区共有多少人 木质货架展柜 贵阳 房价 崩盘 公安县房价 义乌衣柜 蒂芙尼项链价格 悬臂式货架 纱窗价格 辉煌浴室柜 乐从搬家公司 厂价直销布艺沙发 赛尔美卫浴 房价排行榜 崇州二手房 人造革沙发护理剂 窗帘垂线 静电厂家 搬家公司电话 荆门二手房 智能立体仓库设计 jb/t5323-1991立体仓库焊接式钢结构货架技术条件 箭牌卫浴价格 帝王卫浴马桶 哈市房价 单体浴室柜 隐形防盗网价格 窗帘水波幔头 网吧沙发桌椅 提花窗帘 百子湾租房价位 美罗牌 沙发 漫城房价 衣柜 平开门尺寸 朔州新小区 建博会亚丹衣柜 杭州好的搬家公司 圣马利卫浴 西安二手房 宿迁二手房出售 惠园小区 西安南郊房价 天津制造仓库货架 银川房价 防爆灯价格 肯德基卡座沙发 陵东小区 深证横坑房价 椅子厂家 飞鹤飞帆奶粉价格表 衣柜风水 鹅卵石价格 上海货架厂 门禁厂家 窗帘怎么做 仓库货架品牌 奥米兰马桶 沈阳防盗门厂家 恩博卫浴 超市货架 日本智能马桶盖 腾佑货架 小柚木家具 绍兴吊装公司电话 千家乐卫浴 衣柜移门厂家 窗帘带窗幔 车货架 成都浴室柜批发家 窗帘的安装 足疗沙发价格