BootStrap -- Grid System

<script src="jquery.1.9.js"></script>
<script src="js/bootstrap.min.js"></script>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-theme.min.css">

<h2>Files Required</h2>
<h3>1.jquery.js</h3>
<h3>2.bootstrap.min.js</h3>
<h3>3.bootstrap.min.css</h3>
<h3>4.bootstrap-theme.min.css</h3>

<body>

<h3>Grid system </h3>
<p>1.layout </p>
<div class="row">
    <div class="col-md-2 col-xs-2">
        <p>col-md-2 is for desktop</p>
		<p>col-xd-2 is for phone</p>
    </div>
    <div class="col-md-4 col-xs-4">
        <p>col-md-4 is for desktop</p>
		<p>col-xd-4 is for phone</p>
    </div>
    <div class="col-md-6 col-xs-6">
        <p>col-md-6 is for desktop</p>
		<p>col-xd-6 is for phone</p>
    </div>
</div>

<p>2.offset</p>
<div class="row">
    <div class="col-md-4">
        <p>col-md-4 is for desktop</p>
		<p>col-xd-4 is for phone</p>
    </div>
    <div class="col-md-4 col-offset-4">
        <p>col-md-4 is for desktop</p>
		<p>col-xd-4 is for phone</p>
    </div>
</div>

<p>3.nested row sample</p>
<div class="row">
<div class="col-md-6">1<br/>1</div>
<div class="col-md-6">
<div class="col-md-12">2.1</div>
<div class="col-md-12">2.2</div>
</div>

</div>

<script >

$(document).ready(function(){
$(".row").children("div").css("border","2 solid #fff000");
$(".row-fluid").children("div").css("border","2 solid #fff000");
});

</script>

</body>

时间: 2025-01-02 03:06:44

BootStrap -- Grid System的相关文章

4 classes in Bootstrap Grid system

The Bootstrap grid system has four classes: xs: extra small screens (mobile phones) sm: small screens (tablets) md: medium screens (normal desktops) lg: large screens (large desktops)

[转载]Understanding the Bootstrap 3 Grid System

https://scotch.io/tutorials/understanding-the-bootstrap-3-grid-system With the 3rd version of the great Bootstrap out for about 4 and a half months now, people have had their time to play around with it, learn the changes, find new features, and buil

Bootstrap 网格系统(Grid System)

Bootstrap 网格系统(Grid System) Bootstrap提供了一套响应式,移动设备优先的流式网格系统,随着屏幕或视口(viewport)尺寸的增加,系统会自动分为最多12列. 什么是网格(Grid) 摘自维基百科: 在平面设计中,网格是一种由一系列组织内容的相交直线(垂直的.水平的)组成的结构(通常是二维的),它广泛应用于打印设计中设计布局和内容结构,在网页设计中,它是一种用于快递创建一致的布局和有效的使用html与css的方法. 简单的话,网页设计中的网格用于组织内容,让网站

Bootstrap 网格系统(Grid System)实例1

Bootstrap 网格系统(Grid System)实例:堆叠水平 <!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Bootstrap历练作品: 堆叠水平</title> <meta charset="utf-8"

Bootstrap 网格系统(Grid System)实例2

Bootstrap 网格系统(Grid System):堆叠水平,两种样式 <!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Bootstrap历练作品: 堆叠水平</title> <meta charset="utf-8&q

BootStrap入门教程 (一) :手脚架Scaffolding(全局样式(Global Style),格网系统(Grid System),流式格网(Fluid grid System),自定义(Customing),布局(Layouts))

2011年,twitter的“一小撮”工程师为了提高他们内部的分析和管理能力,用业余时间为他们的产品构建了一套易用.优雅.灵活.可扩展的前端工具集--BootStrap.Bootstrap由MARK OTTO和Jacob Thornton所设计和建立,在github上开源之后,迅速成为该站上最多人watch&fork的项目.大量工程师踊跃为该项目贡献代码,社区惊人地活跃,代码版本进化非常快速,官方文档质量极其高(可以说是优雅),同时涌现了许多基于Bootstrap建设的网站:界面清新.简洁;要素

Bootstrap grid实例(Asp.net)

<link href="../../js/jqGrid/css/ui.jqgrid.css" rel="stylesheet" type="text/css" /> <link href="../../css/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <scrip

一个简单的响应式横向网格布局框架Responsive Grid System

网页设计中有一个怎么也绕不开的问题,那就是布局问题.一般来说,一个div可能会分割成很多部分,同样是横向分割成两部分,但是在不同的项目中,我们可能会用不同的css代码,网格系统其实就是为这一类似的问题提供一个统一的解决办法. 网格布局有很多,但是有很多非常复杂,往往无法二次开发.Responsive Grid System是国外的一个网站,他们提供了一种非常简单的实现.其实每一个前端开发人员都可以写出这样的框架,但是,从头开始也许会让很多人动力不足.这个框架代码很简单,对我而言,采用它的原因仅仅

Bootstrap3 Gird system原理及应用

刚开始用Bootstrap的格子系统写布局的时候遇到了这样一个问题: 我的页面中有这样一个布局 我希望当屏幕的宽度小于他们俩宽度之和的时候,右边的部分会掉下来,他们垂直摆放. 而我用col-xs-6的话,右边的盒子永远都不会掉下来. 文字就变得这么丑. 如果我用col-sm-6的话,右边的盒子又会太早掉下来. 此时的屏幕宽度是766px,他就已经堆叠排放了,两边留下了大片空白,还是很丑. 而Bootstarp没有提供中间的选项了. 想要解决这个问题,必须要弄清楚这种响应式布局的是如何工作的. B