bootstrap学习笔记(二)
2016-07-28 18:34
501 查看
以最新的ie版本显示网页
<meta http-equiv=“X-UA-Compatible” content=“IE=edge”>
解决ie9以下不兼容html5
<!—[if lt IE 9]>
<script src=“bootstrap/js/html5shiv.min.js”></script>
<script src=“bootstrap/js/respond.min.js”></script>
<![endif]—>
栅格系统
Bootstrap把一个容器或整个网页分成12列 超过12列自动换行
Bootstrap的栅格系统由一行多列组成
栅格系统必须放在.container和.container-fluid之中
栅格系统参数
样式名称 分辨率 .container max width colspacing
.col-xs-n (0,768px) auto 30px
.col-sm-n [768px,992px) 750px 30px
.col-md-n [992px,1200px) 970px 30px
.col-lg-n [1200px,MAX_INFINITY] 1170px 30px
列偏移
.col-md-offset-n
.help-block以块方式显示 不紧凑
复选框
<div class=“form-group”>
<label class=“col-md-2 control-label”>兴趣爱好:</label>
<div class=“col-md-10”>
<label class=“checkbox-inline”><input type=“checkbox”>画画</label>
<label class=“checkbox-inline”><input type=“checkbox”>唱歌</label>
<label class=“checkbox-inline”><input type=“checkbox”>运动</label>
</div>
</div>
单选按钮
<div class=“form-group”>
<label class=“col-md-2 control-label”>学历:</label>
<div class=“col-md-10”>
<label class=“radio-inline”><input type=“radio”>预科</label>
<label class=“radio-inline”><input type=“radio”>学士</label>
<label class=“radio-inline”><input type=“radio”>硕士</label>
</div>
</div>
.form-horizontal水平排列元素 还需要添加栅格系统 才能使字段名和输入元素在一行
.control-label控制文本距离 能使字段名靠近输入元素
按钮样式
适用于<a><input><button>
.btn全局样式
按钮颜色
.btn-default
.btn-primary
.btn-success
.btn-info
.btn-warning
.btn-danger
.btn-link
按钮大小
.btn-lg大
.btn-sm小
.btn-xs超小
激活状态
.active
.disabled
.btn-block将按钮拉伸到撑满整个父元素
<meta http-equiv=“X-UA-Compatible” content=“IE=edge”>
解决ie9以下不兼容html5
<!—[if lt IE 9]>
<script src=“bootstrap/js/html5shiv.min.js”></script>
<script src=“bootstrap/js/respond.min.js”></script>
<![endif]—>
栅格系统
Bootstrap把一个容器或整个网页分成12列 超过12列自动换行
Bootstrap的栅格系统由一行多列组成
栅格系统必须放在.container和.container-fluid之中
栅格系统参数
样式名称 分辨率 .container max width colspacing
.col-xs-n (0,768px) auto 30px
.col-sm-n [768px,992px) 750px 30px
.col-md-n [992px,1200px) 970px 30px
.col-lg-n [1200px,MAX_INFINITY] 1170px 30px
列偏移
.col-md-offset-n
.help-block以块方式显示 不紧凑
复选框
<div class=“form-group”>
<label class=“col-md-2 control-label”>兴趣爱好:</label>
<div class=“col-md-10”>
<label class=“checkbox-inline”><input type=“checkbox”>画画</label>
<label class=“checkbox-inline”><input type=“checkbox”>唱歌</label>
<label class=“checkbox-inline”><input type=“checkbox”>运动</label>
</div>
</div>
单选按钮
<div class=“form-group”>
<label class=“col-md-2 control-label”>学历:</label>
<div class=“col-md-10”>
<label class=“radio-inline”><input type=“radio”>预科</label>
<label class=“radio-inline”><input type=“radio”>学士</label>
<label class=“radio-inline”><input type=“radio”>硕士</label>
</div>
</div>
.form-horizontal水平排列元素 还需要添加栅格系统 才能使字段名和输入元素在一行
.control-label控制文本距离 能使字段名靠近输入元素
按钮样式
适用于<a><input><button>
.btn全局样式
按钮颜色
.btn-default
.btn-primary
.btn-success
.btn-info
.btn-warning
.btn-danger
.btn-link
按钮大小
.btn-lg大
.btn-sm小
.btn-xs超小
激活状态
.active
.disabled
.btn-block将按钮拉伸到撑满整个父元素
相关文章推荐
- bootstrap 下拉选择框select实现从服务器加载option
- bootstrap学习笔记(一)
- netty 第一章 ServerBootstrap 和 ClientBootstrap
- bootstrap-treeview
- 关于bootstrap弹出二级对话框的使用
- Bootstrap实现标签页效果
- Web 前端 UI 框架 Bootstrap
- bootstrap validator setting部分 中文文档
- 用bootstrap做下拉菜单,并使用jQuery实现从服务器加载下拉菜单的item。
- disable bootstrap
- CSS框架 bootstrap
- bootstrap实现页面布局效果
- bootstrap 实现简单轮播
- @-ms-viewport
- Hammer.js——给bootstrap添加触屏功能
- rebar3 bootstrap fetch_fail 记录
- 20分钟打造属于你的Bootstrap站点
- 第一次接触神奇的Bootstrap网格系统
- 第一次接触神奇的Bootstrap表单
- bootstrap模态框中含有echart图表的打印