Bootstrap 是一个用于快速开发 Web 应用程序和网站的前端框架。

Bootstrap 是基于 HTML、CSS、JAVASCRIPT

<link href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

运用了一个link标签,href属性                                                        引入一个外部样式表文件

<script src="https://code.jquery.com/jquery.js"></script>

<script src="js/bootstrap.min.js"></script>

以上3个文件就可以使用Bootstrap,JQ一定是在最上边的

<!--[if lt IE 9]>

<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>

<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>

<![endif]-->  这不是注释语法,而是if语句

二 网格系统

默认的把一行拆成12个格   网格系统宽度  同一级别的谁在下面用谁的,上边的会被覆盖掉

例:

<body>

<div class="container">      container  代表容器
 <div class="row"> 
<div class="col-xs-6"></div> * 是能替换掉的
<div class="col-xs-6"></div>
</div>
</div>
</body>

注:在bootstrap里的class名不能更改,因为预设了很多样式,直接复制

如果做响应式的效果,选择XS的效果更显著

例:如何同时控制4个

<style type="text/css">

*{ margin:0px auto; padding:0px}

.d1{ background-color:#F30;  color:white; text-align:center; line-height:30px; height:30px; vertical-align:middle}

</style>

<body>

<div class="container">

<div class="row">

<div class="col-xs-2 d1">首页</div>

<div class="col-xs-4 d1">产品介绍</div>

<div class="col-xs-4 d1">售后服务</div>

<div class="col-xs-2 d1">联系我们</div>

</div>

</div>

</body>

max-width     max:最大宽

响应式实用工具

 例:放置位置

<div class="container">

<div class="row">

<div class="col-xs-2 d1 ">首页</div>

<div class="col-xs-4 d1 hidden-xs">产品介绍</div>

<div class="col-xs-4 d1 hidden-xs">售后服务</div>

<div class="col-xs-2 d1 hidden-xs">联系我们</div>

</div>

</div>

 练习图

<title>无标题文档</title>
<link href="dist/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<script src="dist/js/jquery-1.11.2.min.js"/></script>
<script src="dist/js/bootstrap.min.js"/></script> <style type="text/css">
*{ margin:0px auto; padding:0px}
@media (min-width:768px){.container{width:100%}}
@media (min-width:992px){.container{width:100%}}
@media (min-width:1200px){.container{width:100%}}
.d1{ background-color:#F60; color:#FFF; text-align:center; line-height:40px; height:40px; vertical-align:middle; font-weight:bold}
.t1{ max-width:400px;}
</style>
</head> <body>
<div class="container">
<div class="row">
<div class="col-xs-2 d1">首页</div>
<div class="col-xs-4 d1">产品展示</div>
<div class="col-xs-4 d1">售后服务</div>
<div class="col-xs-2 d1">联系我们</div>
</div>
</div>
<table class="table table-striped">
<caption>条纹表格布局</caption>
<thead>
<tr>
<th>名称</th>
<th>城市</th>
<th>邮编</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tanmay</td>
<td>Bangalore</td>
<td>560001</td>
</tr>
<tr>
<td>Sachin</td>
<td>Mumbai</td>
<td>400003</td>
</tr>
<tr>
<td>Uma</td>
<td>Pune</td>
<td>411027</td>
</tr>
</tbody>
</table>
<input type="text" class="form-control t1" placeholder="请输入用户名"> </body>

Bootstrap的学习的更多相关文章

  1. bootstrap组件学习

    转自http://v3.bootcss.com/components/ bootstrap组件学习 矢量图标的用法<span class="glyphicon glyphicon-se ...

  2. bootstrap插件学习-bootstrap.dropdown.js

    bootstrap插件学习-bootstrap.dropdown.js 先看bootstrap.dropdown.js的结构 var toggle = '[data-toggle="drop ...

  3. bootstrap插件学习-bootstrap.modal.js

    bootstrap插件学习-bootstrap.modal.js 先从bootstrap.modal.js的结构看起. function($){ var Modal = function(){} // ...

  4. Bootstrap基础学习 ---- 系列文章

    [Bootstrap基础学习]05 Bootstrap学习总结 [Bootstrap基础学习]04 Bootstrap的HTML和CSS编码规范 [Bootstrap基础学习]03 Bootstrap ...

  5. bootstrap基础学习【导航条、分页导航】(五)

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  6. bootstrap基础学习【菜单、按钮、导航】(四)

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  7. bootstrap基础学习【网格系统】(三)

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  8. bootstrap基础学习【表单含按钮】(二)

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  9. bootstrap基础学习【排版】(一)

    <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title&g ...

  10. 通过bootstrap来学习less

    很早之前就听说过less了,但是一直拖着没去学习.最近抽空看了less,其实语法很简单,看一遍基本就知道怎么用了.平时自己写页面用less的话,感觉是方便了些,但是难道less的好处就只是这样? 刚好 ...

随机推荐

  1. JavaScript常用方法100种

    1.输出语句:document.write(""); 2.JS中的注释为// 3.传统的HTML文档顺序是:document->html->(head,body) 4. ...

  2. 使用zabbix邮件发送报表

    简介 首先我们来看下图片的url (右击screens中随便一张图片,选复制图片地址) http://zabbix.xxx.com/chart2.php?graphid=524&screeni ...

  3. 大文件下载控件(down2)-示例更新-Xproer.HttpDownloader

    版权所有 2009-2016 荆门泽优软件有限公司 保留所有权利 官方网站:http://www.ncmem.com/ 产品首页:http://www.ncmem.com/webapp/down2/i ...

  4. Django-安装篇

    前提准备:Python,PIP Python直接去官网下载并安装:https://www.python.org/download/,本机安装Python版本:Python 2.7.10 PIP:htt ...

  5. P1907飞扬的小鸟

    P1907飞扬的小鸟 描述 Flappy Bird 是一款风靡一时的休闲手机游戏.玩家需要不断控制点击手机屏幕的频率来调节小鸟的飞行高度,让小鸟顺利通过画面右方的管道缝隙.如果小鸟一不小心撞到了水管或 ...

  6. mysql命令化操作实用小技巧

    ★1.问:如果我的mysql数据库服务器程序在D:\program files\phpstudy\mysql,里,那么我该怎么在cmd命令状态下使用它?      进入cmd状态后,系统默认在当前用户 ...

  7. [leetcode 34] search for a range

    1 题目: Given a sorted array of integers, find the starting and ending position of a given target valu ...

  8. dubbo分布式rpc框架用法

    dubbo是阿里巴巴开源的分布式服务框架,致力于提供高性能和透明化的rpc远程服务调用方案,以及soa服务治理方案,如果没有分布式需求,是不需要dubbo的,分布式环境dubbo的使用架构官方给出了一 ...

  9. node.js-session问题

    在使用express使用session时发现怎么使用session都是undefined最后发现 app.use(express.cookieParser()); app.use(express.se ...

  10. 更高效地提高redis client多线程操作的并发吞吐设计

    Redis是一个非常高效的基于内存的NOSQL数据库,它提供非常高效的数据读写效能.在实际应用中往往是带宽和CLIENT库读写损耗过高导致无法更好地发挥出Redis更出色的能力.下面结合一些redis ...