表格

1、基本类  .table  {width/margin-bottom/}  {padding/border-top}

e.g.:<table class="table"> <tr><th>表头</th></tr> <tr><td>内容</td></tr> </table>

2、条纹表格  .table-striped  {nth-of-type(odd):background-color}

e.g.:<table class="table table-striped"> <tr><th>表头</th></tr> <tr><td>内容</td></tr> </table>

3、边框表格  .table-border  {border}

e.g.:<table class="table table-border"> <tr><th>表头</th></tr> <tr><td>内容</td></tr> </table>

4、鼠标悬停  .table-hover  {background-color}

e.g.:<table class="table table-hover"> <tr><th>表头</th></tr> <tr><td>内容</td></tr> </table>

5、紧缩的表格  .table-condesed

e.g.:<table class="table table-condesed"> <tr><th>表头</th></tr> <tr><td>内容</td></tr> </table>

6、状态类  .active  .success  .warning  .danger  .info

e.g.:

行状态<table class="table"> <tr class="active"><th>表头</th></tr> <tr tr class="active"><td>内容</td></tr> </table>||<table class="table"> <tr class="success"><th>表头</th></tr> <tr tr class="success"><td>内容</td></tr> </table>||<table class="table"> <tr class="warning"><th>表头</th></tr> <tr tr class="warning"><td>内容</td></tr> </table>||<table class="table"> <tr class="danger"><th>表头</th></tr> <tr tr class="danger"><td>内容</td></tr> </table>||<table class="table"> <tr class="info"><th>表头</th></tr> <tr tr class="info"><td>内容</td></tr> </table>

列数据状态<table class="table"> <tr><th class="active">表头</th></tr> <tr><td class="active">内容</td></tr> </table>||<table class="table"> <tr><th class="success">表头</th></tr> <tr><td class="success">内容</td></tr> </table>||<table class="table"> <tr><th class="warning">表头</th></tr> <tr><td class="warning">内容</td></tr> </table>||<table class="table"> <tr><th class="danger">表头</th></tr> <tr><td class="danger">内容</td></tr> </table>||<table class="table"> <tr><th class="info">表头</th></tr> <tr><td class="info">内容</td></tr> </table>

7、响应式表格  .table-responsive

e.g.:<div class="table-responsive"><table class="table">表格数据</table></div>

表单

1、使用label和控件组合使用,包裹在.from-group里面获得最好的排列  {margin-bottom}

e.g.:<div class="form-group"><label for="exampleInput">描述内容</label><input type="text" id="exampleInput" /></div>

2、<input>、<select>、<textarea>加类.form-control  {width/padding/border-radius/border}

e.g.:<div class="form-group"><label for="exampleInput">描述内容</label><input class="form-control" type="text" id="exampleInput" /></div>

3、内联表单  .form-inline

e.g.:<form class="form-inline"><div class="form-group"><label><label><input class="form-control" /></div></form> .form-group类表现为inline-block

4、水平排列  .form-horizontal+栅格类+.control-label

e.g.:<form class="form-horizontal"><div class="form-group"><label class="col-md-4 control-label">这是label内容</label><div class="col-md-8"><input class=" form-control" /></div></div></form>

5、输入框  input:text  几乎浏览器自带样式

e.g.:<input type="text" />

6、文本域  input:textarea  几乎浏览器自带样式

e.g.:<input type="textarea" />

7、单选和多选 div+.radio/.checkkbox+属性disabled/.disabled

e.g.:

<div class="radio"><label><input type="radio" />描述内容</label></div>

<div class="checkbox"><label><input type="checkbox" />描述内容</label></div>

<div class="radio disabled"><label><input type="radio" disabled />描述内容</label></div> 禁止点击

<div class="checkbox disabled"><label><input type="checkbox" disabled />描述内容</label></div> 禁止点击

8、内联单选和多选  .radio-inline/.checkbox-inline

e.g.:

<label class="radio-inline"><input type="radio" />1</label>

<label class="checkbox-inline"><input type="checkbox" />1</label>

9、下拉列表  几乎浏览器自带样式

e.g.:<selection><option>选项</option></selection> 根据需要添加类.form-control

10、静态控件  .form-control-static+p

e.g.:<div class="form-group"><label class="col-md-4 control-label">label内容</label><div class="col-md-8"><p class="form-control-static"></p></div></div>

11、禁用状态  disable属性  {cursor/background-color}

e.g.:<input class="form-control" type="..." disabled />

12、<filedset>   disable属性  禁用包含的所有控件

e.g:<form><filedset disabled><div class="form-group"><label></label><input type="..."></div></fieldset></form>

13、只读状态  readonly属性  {background-color}
e.g.:<input type="..." readonly>

14、校验状态  .has-success/.has-warning/.has-error + .control-label/.form-control

e.g.:

<div class="form-group *"><label class=".control-label"></label><input type="text" /></div>

<div class="form-group *"><div class="radio"><label><input type="radio" class="form-control" /></label></div></div>

15、校验状态+图标  .has-feedback+feedback icon

e.g.:<div class="form-group * has-feedback"><label class="control-label"></label><input type="text" class="form-control" /><span class="glyphicon glyphicon-ok form-control-feedback"></span></div>

16、 水平排列/内联+校验+图标  .form-horizontal/.form-inline+校验类+.has-feedback+feedback icon

e.g.:

<form class="from-horizontal"><div class="form-group * has-feedback"><label class="control-label"></label><input type="text" class="form-control" /><span class="glyphicon glyphicon-ok form-control-feedback"></span></div></form>

<form class="from-inline"><div class="form-group * has-feedback"><label class="control-label"></label><input type="text" /><span class="glyphicon glyphicon-ok form-control-feedback"></span></div></form>

17、控件尺寸  .input-lg/.input-sm  {height/padding/border-radius/font-size}

e.g.:<input type="" class="input-lg" />||<input type="" class="input-sm" />

18、水平排列控件尺寸  .form-group-lg/.form-group-sm

e.g.:

<form class="form-horizontal"><div class="form-group form-group-lg"><label class="col-md-4 control-label"></label><div class="col-md-8"><input class="form-control" /></div></div></form>

<form class="form-horizontal"><div class="form-group form-group-sm"><label class="col-md-4 control-label"></label><div class="col-md-8"><input class="form-control"/></div></div></form>

19、列尺寸  栅格类.row+.col-**-*控制尺寸

e.g.:<div class="row"><div class="col-xs-2"><input type="text" class="form-control" placeholder=".col-xs-2"></div><div class="col-xs-3"><input type="text" class="form-control" placeholder=".col-xs-3"></div><div class="col-xs-4"><input type="text" class="form-control" placeholder=".col-xs-4"></div></div>

[Bootstrap]全局样式(三)的更多相关文章

  1. bootstrap 全局样式设置

    HTML <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" co ...

  2. bootstrap全局样式二

    加form-grope是为了以后更好的管理,一组form写一个form-grope 显示如下: 并排显示的话,给用户名前面再加一个div,再加horizontal,如下,并且加上control-lab ...

  3. bootstrap全局样式

    内联子标题: 显示如下: 主体副本: 显示如下: 对齐类: 显示如下: 强调类: 显示如下: 缩略语: 地址: 表格: 加一个class:“table-striped” js里面的奇数偶数行(odd) ...

  4. [Bootstrap]全局样式(五)

    辅助样式 1.情景文本色  .text-muted  .text-primary  .text-success  .text-info  .text-warning  .text-danger  {c ...

  5. [Bootstrap]全局样式(四)

    按钮 1.基本类.btn {display/padding/margin-bottom/font-size/border-radius/border} 作用于< a:role:button &g ...

  6. [Bootstrap]全局样式(二)

    具体排版 1.标题和标题类 <h1> ~<h6>和.h1~h6|副标题<small>和.small font-size                    mar ...

  7. [Bootstrap]全局样式(一)

    页面必须设置为html5文档类型 <!DOCTYPE html> <html lang="zh-CN"> ... </html> 适应移动设备 ...

  8. bootstrap 全局样式

    reset.css html { font-family: sans-serif; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100% ...

  9. bootstrap全局CSS样式学习

    参考http://v3.bootcss.com/css/,根据自己的记忆进行的复述,加深记忆. 首先介绍bootstrap全局CSS样式 只通过使用bootstrap.css,即可获得统一的样式设置. ...

随机推荐

  1. php 算法之切割数组,不用array_chunk(),算法之二,取数组的差值,不用array_diff()

    用php写算法切割数组,不用array_chunk();算法例如以下所看到的. <?php //$array 数组 //$size 每一个数组的个数 //每一个数组元素是否默认键值 functi ...

  2. Android应用之《宋词三百首》(二)

    接上回,上回我们讲到MainActivity里面将所有的宋词标题和作者显示到界面的ListView中去,我们接下来的工作是通过点击ListView的Item跳转到ContentActivity里面去显 ...

  3. PP常用T-CODE

    与BOM相关 CS00 BOM 菜单 BOM Menu CS01 生成物料 BOM Create Material BOM CS02 更改物料 BOM Change Material CS03 显示物 ...

  4. c# winform 把彩色图片转换为灰色的图片,变灰,灰度图片,速度很快,safe,unsafe

    把彩色图片转换为灰色的图片,直接用.net接口遍历每个像素点转换的效率非常低,800K的图片65万像素我的电脑要用5分钟,而用了unsafe,速度提高了几千倍,同样的图片只用了0.几秒 附一个常用的遍 ...

  5. Android:TabHost实现Tab切换

    TabHost是整个Tab的容器,包含TabWidget和FrameLayout两个部分,TabWidget是每个Tab的表情,FrameLayout是Tab内容. 实现方式有两种: 1.继承TabA ...

  6. jdbc连接池中c3p0的配置文件的详解以及在在java中如何使用

    <c3p0-config> <!-- 默认配置,如果没有指定则使用这个配置 --> <default-config> <property name=" ...

  7. 一网打尽OkHttp中的缓存问题

    看到很多小伙伴对OkHttp的缓存问题并不是十分了解,于是打算来说说这个问题.用好OkHttp中提供的缓存,可以帮助我们更好的使用Retrofit.Picasso等配合OkHttp使用的框架.OK,废 ...

  8. Recommended you 3 most popular Nissan pincode calculators

    Have you still felt confused on how to choose a satisfactory Nissan pin code calculator in the marke ...

  9. Java基础知识强化103:Java常量池理解与总结

    一.相关概念 1. 什么是常量 用final修饰的成员变量表示常量,值一旦给定就无法改变! final修饰的变量有三种:静态变量.实例变量和局部变量,分别表示三种类型的常量. 2. Class文件中的 ...

  10. Xquartz远程访问linux

    实验环境:mac 操作系统:         OS X 10.9.4 Mavericksmac IP                      192.168.1.106XQuartz:       ...