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
pdf转cad软件怎么用mts格式转换mov软件下载做物流单号的软件下载动画滤镜软件启动程序的软件pdf转cad软件怎么用做cs mv的软件下载做物流单号的软件下载无损压缩的格式转换软件qq名片拉圈圈99软件有啥好的进程隐藏软件pdf转cad软件怎么用快手加特效什么软件好有啥好的进程隐藏软件做物流单号的软件下载黑折软件下载52单片机的编程软件启动程序的软件启动程序的软件自动换背景拍照软件mp3转wav-安装软件u8软件视频无损压缩的格式转换软件简单的销售记账软件旋转照片软件苹果系统远程桌面软件下载动画滤镜软件硬盘怎么限制安装软件下载自动换背景拍照软件外语软件app推荐人族无帝尊,妖帝出锁界,人族一代尊主紫舍帝尊消失于无相海深处,百年之后,妖帝率领万妖打开锁妖界,入侵人族,攻守之势逆转,各地宗门大肆招收门徒应对妖族的侵扰,山村少年张擎亲眼看见村庄被屠,走投无路的他被庆云宗长老救下,开启修仙之途,终成新的帝尊。故事发生在新冠疫情前后,时间跨度两年多,围绕一个诈骗案中的一个重要嫌疑人,警方和卧底展开全方位的配合,深入看守所和监狱,最后成功突破嫌疑人的保护,将其缉拿归案。 本故事采用纪实叙事的手法,描写了一个在违法的青年所经历的牢狱生活后,在其中的挣扎、痛苦、自省、新生,从一个全新的视角向读者展示了另一个少有听闻的生活环境,具有极强的警示和教育意义。 主角因为犯罪后被捕入狱,在被关押期间和办案民警合作,接近并取得重点嫌疑犯的信任,为破案提供了关键性的证据,最后成功协助警方破案。 陈阳穿越到了高武世界,获得了一个能查看人生剧本的系统! 这人生剧本,能预知人未来,查看命格,甚至连对方的最近机缘都一目了然! “绝世机遇!?不好意思,我先收为敬!” 三流的主角等机缘。 二流的主角找机缘! 而陈阳:机缘在哪,我就在哪! 【老婆做封面,快乐永无限!】 陈阎在末日寻找病毒血清,在关键时刻惨遭女友背叛,濒死之际意外觉醒了死亡系统,转世重生到年前。陈阎:什么死亡才能变强?御兽时代,全民契约。 异界生灵将在100天后入侵蓝星。 前世,林秋因为防御太弱,没有熬过那百日之后的灾难。 重生的林秋,觉醒了神级御兽师天赋【大自在】,拥有了为其御兽自由加点的恐怖能力。 出于谨慎,他将自由属性点全点防御力。 一个远超想象的史诗时代出现在他面前……十年前,杀星江峰横空出世,枪挑修道世家,剑夺美人娇妻,娶了13个老婆。 后来被雷劈死了。 子嗣江川,拥有超凡能力却无法修行,百年岁月就要沦为黄土… 仰天长啸,苍茫星海,如何走出长生路? 中年男人返回呼伦贝尔深处大兴安岭腹地的神奇经历。福无双至祸不单行。法洛斯大陆先失去了日月陷入永夜,随后势不可挡的冰魔大军又渡海而来毁灭了大陆诸国,奴役了人类一百年。 百年后,一位神秘的青年用火焰魔法驱逐了冰魔,自身化作新的太阳照耀大陆,被人类尊为火神。 但火神未能带来真正的和平。各类魔物仍不断接踵而来,新生的人类帝国培养了有着超人体能、感官的猎魔士。 作为新晋猎魔士的男主角李奥,因解救了在打猎时遭到魔物袭击的皇帝,被皇帝提拔为贴身侍卫。可之后不久,皇帝遇刺亡,公主遭到绑架,李奥被当成了凶手。 在为自己洗刷冤屈的过程中,李奥发现了猎魔士的起源,却也因此使猎魔士和人类对立起来,直至爆发内战。 对人类失望的火神再次现世,企图毁灭一切。在李奥爆发出自身隐藏的未知力量后,火神和战争被阻止了。李奥也为了调查太阳消失的真相,踏上了在穿越世界的旅行…… 修仙难,一看天赋,二看机缘,三看身家。 王耀穿越而来,却成为一介天赋全无的边远村民。 且看王耀如何以妖入道,踏上仙徒,巧妙周旋,化险为夷。 凭借一腔热血,二世为人,成就三界功绩,四世威名!道是有情却无情,只因烽烟起。利剑出鞘,却为苍生求太平。治大国如烹小鲜,村战一样要用孙子兵法。情节看似荒诞不经,却有迹可循。不一样的战争,不一样的视角,精彩还在继续,胜负还未见分晓。。
规则碎片 吞天道王 惊世绝俗 红墓碑 尘与钢 猛龙出狱 钟表外的平凡人生 看那一弯新月 神秘复苏之未来诡 长生记:轮回之界 孤单之城 全球御兽:开局契约一只鬼 迎风而行 我只想做个二把手 开局SSS级千手观音金身 紫月录 云上平田 重生之我是鬼神 九品道玄 洪荒之彼岸 苹果系统远程桌面软件下载 黑折软件下载 百科幕墙计算软件cad工具 启动程序的软件 mts格式转换mov软件下载 硬盘怎么限制安装软件下载 百科幕墙计算软件cad工具 免费加画外音软件 闭屏摄像软件 快手加特效什么软件好 女性排软期app软件 女性排软期app软件 简单的销售记账软件 黑折软件下载 pdf转cad软件怎么用 旋转照片软件 简谱软件美得理1.0.2 苹果系统远程桌面软件下载 重做系统软件会丢吗 做物流单号的软件下载 caj云阅读软件 做物流单号的软件下载 重做系统软件会丢吗 u8软件视频 qq名片拉圈圈99软件 玩图相关软件 苹果系统远程桌面软件下载 重做系统软件会丢吗 重做系统软件会丢吗 闭屏摄像软件 启动程序的软件 caj云阅读软件 动画滤镜软件 pdf转cad软件怎么用 简单的销售记账软件 旋转照片软件 动画滤镜软件 百科幕墙计算软件cad工具 简单的销售记账软件 哪种视频美化软件好 旋转照片软件 免费加画外音软件 自动换背景拍照软件 简谱软件美得理1.0.2 有啥好的进程隐藏软件 caj云阅读软件 女性排软期app软件 旋转照片软件 玩图相关软件 52单片机的编程软件 亚星游戏官网 亚星官网 亚星官网 亚星游戏官网 亚星官网 陶三 mere trash 命运之人 妖人在都市 三国利刃 欧博游戏官网 皇冠登3出租 亚星管理平台 欧博游戏官网 亚星管理平台 简单的销售记账软件 闭屏摄像软件 caj云阅读软件 硬盘怎么限制安装软件下载 松下mb778cn扫描软件 u8软件视频 松下mb778cn扫描软件 无损压缩的格式转换软件 做物流单号的软件下载 女性排软期app软件 外语软件app推荐 mp3转wav-安装软件 旋转照片软件 mts格式转换mov软件下载 旋转照片软件 外语软件app推荐 u8软件视频 旋转照片软件 女性排软期app软件 u8软件视频 黑折软件下载 百科幕墙计算软件cad工具 黑折软件下载 松下mb778cn扫描软件 免费加画外音软件 松下mb778cn扫描软件 苹果系统远程桌面软件下载 pdf转cad软件怎么用 做cs mv的软件下载 动画滤镜软件