Bootstrap的学习
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的学习的更多相关文章
- bootstrap组件学习
转自http://v3.bootcss.com/components/ bootstrap组件学习 矢量图标的用法<span class="glyphicon glyphicon-se ...
- bootstrap插件学习-bootstrap.dropdown.js
bootstrap插件学习-bootstrap.dropdown.js 先看bootstrap.dropdown.js的结构 var toggle = '[data-toggle="drop ...
- bootstrap插件学习-bootstrap.modal.js
bootstrap插件学习-bootstrap.modal.js 先从bootstrap.modal.js的结构看起. function($){ var Modal = function(){} // ...
- Bootstrap基础学习 ---- 系列文章
[Bootstrap基础学习]05 Bootstrap学习总结 [Bootstrap基础学习]04 Bootstrap的HTML和CSS编码规范 [Bootstrap基础学习]03 Bootstrap ...
- bootstrap基础学习【导航条、分页导航】(五)
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- bootstrap基础学习【菜单、按钮、导航】(四)
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- bootstrap基础学习【网格系统】(三)
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- bootstrap基础学习【表单含按钮】(二)
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- bootstrap基础学习【排版】(一)
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title&g ...
- 通过bootstrap来学习less
很早之前就听说过less了,但是一直拖着没去学习.最近抽空看了less,其实语法很简单,看一遍基本就知道怎么用了.平时自己写页面用less的话,感觉是方便了些,但是难道less的好处就只是这样? 刚好 ...
随机推荐
- nodejs前端跨域访问
XMLHttpRequest cannot load http://localhost:3000/. No 'Access-Control-Allow-Origin' header is presen ...
- 简单的css js控制table隔行变色
(1)用expression 鼠标滑过变色: <style type="text/css"><!-- table { background-color:#0000 ...
- 版本控制--github相关
安装 Git 后,你应该做一些只需做一次的事情:系统设置——这样的设置在每台电脑上只需做一次: $ git config --global user.name "Your Name" ...
- SNMP–Simple Network Management Protocol
I am planning to write an introduction and simple implementation of SNMP in software, when my work w ...
- 练习1-23:删去C语言程序中所有的注释语句(C程序设计语言 第2版)
#include <stdio.h> main() { FILE * fp_i; FILE * fp_o; fp_i = fopen("input.txt", &quo ...
- C#的winform编程入门简单介绍
C#中事件.事件委托.事件的订阅 例子: using System.Timers; Timer t1 = new Timer(); t1.Tick += new EventHandler(XX); p ...
- 配置IP地址
1.linux如果在一个路由器环境中,则可以使用dhclient命令获取IP地址. dhclient 2.手动配置 打开配置文件 vi /etc/sysconfig/network-scripts/i ...
- bootstrap-datetimepicker.js 设置开始时间的Bug。
原地址:http://www.malot.fr/bootstrap-datetimepicker 修改的地方有三处: 1. var months = this.setTitle('.datetimep ...
- 设计模式之美:Null Object(空对象)
索引 意图 结构 参与者 适用性 效果 相关模式 实现 实现方式(一):Null Object 的示例实现. 意图 通过对缺失对象的封装,以提供默认无任何行为的对象替代品. Encapsulate t ...
- 5天玩转C#并行和多线程编程 —— 第一天 认识Parallel
5天玩转C#并行和多线程编程系列文章目录 5天玩转C#并行和多线程编程 —— 第一天 认识Parallel 5天玩转C#并行和多线程编程 —— 第二天 并行集合和PLinq 5天玩转C#并行和多线程编 ...