Bootstrap学习4--Table样式(转载:https://blog.csdn.net/Fanbin168/article/details/53208869)
备注:最新Bootstrap手册:http://www.jqhtml.com/bootstraps-syntaxhigh/index.html
将<table>标签添加class=‘table’ 类后的样式
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Table样式</title> <link href="~/bootstrap/css/bootstrap.css" rel="stylesheet" />
<script src="~/bootStrapPager/js/jquery-1.11.1.min.js"></script>
<script src="~/bootstrap/js/bootstrap.js"></script>
</head>
<body>
<table class="table">
<thead>
<tr><th>编号</th><th>姓名</th><th>年龄</th></tr>
</thead>
<tbody>
<tr><td>001</td><td>郭靖</td><td>25</td></tr>
<tr><td>002</td><td>黄蓉</td><td>23</td></tr>
<tr><td>003</td><td>杨过</td><td>24</td></tr>
</tbody>
</table>
</body>
</html>
我们可以看到,Table是可以自由缩放的(不是响应式,应该是流媒体式)

class='table table-striped' 条纹状表格(隔行变色)
<body>
<table class="table table-striped">
<thead>
<tr><th>编号</th><th>姓名</th><th>年龄</th></tr>
</thead>
<tbody>
<tr><td>001</td><td>郭靖</td><td>25</td></tr>
<tr><td>002</td><td>黄蓉</td><td>23</td></tr>
<tr><td>003</td><td>杨过</td><td>24</td></tr>
</tbody>
</table>
</body>

class="table table-bordered" 给表格添加边框
<body>
<table class="table table-bordered">
<thead>
<tr><th>编号</th><th>姓名</th><th>年龄</th></tr>
</thead>
<tbody>
<tr><td>001</td><td>郭靖</td><td>25</td></tr>
<tr><td>002</td><td>黄蓉</td><td>23</td></tr>
<tr><td>003</td><td>杨过</td><td>24</td></tr>
</tbody>
</table>
</body>

class="table table-hover" 鼠标悬停变色
<body>
<table class="table table-hover">
<thead>
<tr><th>编号</th><th>姓名</th><th>年龄</th></tr>
</thead>
<tbody>
<tr><td>001</td><td>郭靖</td><td>25</td></tr>
<tr><td>002</td><td>黄蓉</td><td>23</td></tr>
<tr><td>003</td><td>杨过</td><td>24</td></tr>
</tbody>
</table>
</body>

class="sr-only" 隐藏某一行
<body>
<table class="table">
<thead>
<tr><th>编号</th><th>姓名</th><th>年龄</th></tr>
</thead>
<tbody id="abc">
<tr class="sr-only"><td>001</td><td>郭靖</td><td>25</td></tr>
<tr><td>002</td><td>黄蓉</td><td>23</td></tr>
<tr><td>003</td><td>杨过</td><td>24</td></tr>
</tbody>
</table>
</body>
在第一行的tr上使用了sr-only样式后,编号为001的那一行被隐藏了

状态类(主要做标记)
可以单独设置每一行的背景样式(总共有5中不同的样式可以选择)

<body>
<table class="table">
<thead>
<tr><th>编号</th><th>姓名</th><th>年龄</th></tr>
</thead>
<tbody>
<tr class="active"><td>001</td><td>郭靖</td><td>25</td></tr>
<tr class="success"><td>002</td><td>黄蓉</td><td>23</td></tr>
<tr class="info"><td>003</td><td>杨过</td><td>24</td></tr>
<tr class="warning"><td>004</td><td>黄老邪</td><td>54</td></tr>
<tr class="danger"><td>005</td><td>欧阳锋</td><td>42</td></tr>
</tbody>
</table>
</body>

响应式表格
class="table-responsive 浏览器宽度小于768px时,表格出现边框。(注意:这个样式定义在表格的父元素上)
响应式表格就是当浏览器小于多少宽度或者高度的时候做出什么动作,例如当浏览器的的宽度小于768px的时候表格出现边框
<body class="table-responsive">
<table class="table ">
<thead>
<tr><th>编号</th><th>姓名</th><th>年龄</th></tr>
</thead>
<tbody id="abc">
<tr><td>001</td><td>郭靖</td><td>25</td></tr>
<tr><td>002</td><td>黄蓉</td><td>23</td></tr>
<tr><td>003</td><td>杨过</td><td>24</td></tr>
</tbody>
</table>
</body>

Bootstrap学习4--Table样式(转载:https://blog.csdn.net/Fanbin168/article/details/53208869)的更多相关文章
- Mui本地打包笔记(一)使用AndroidStudio运行项目 转载 https://blog.csdn.net/baidu_32377671/article/details/79632411
转载 https://blog.csdn.net/baidu_32377671/article/details/79632411 使用AndroidStudio运行HBuilder本地打包的Mui项目 ...
- AutoFac控制反转 转载https://blog.csdn.net/u011301348/article/details/82256791
一.AutoFac介绍 Autofac是.NET里IOC(Inversion of Control,控制反转)容器的一种,同类的框架还有Spring.NET,Unity,Castle等.可以通过NuG ...
- 爬虫出现Forbidden by robots.txt(转载 https://blog.csdn.net/zzk1995/article/details/51628205)
先说结论,关闭scrapy自带的ROBOTSTXT_OBEY功能,在setting找到这个变量,设置为False即可解决. 使用scrapy爬取淘宝页面的时候,在提交http请求时出现debug信息F ...
- MVC和WebApi 使用get和post 传递参数。 转载https://blog.csdn.net/qq373591361/article/details/51508806
版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/qq373591361/article/details/51508806我们总结一下用js请求服务器的 ...
- 已知IP地址和子网掩码求出网络地址、广播地址、地址范围和主机数(转载https://blog.csdn.net/qq_39026548/article/details/78959089)
假设IP地址为128.11.67.31,子网掩码是255.255.240.0.请算出网络地址.广播地址.地址范围.主机数.方法:将IP地址和子网掩码转化成二进制形式,然后进行后续操作. IP地址和子网 ...
- Scrapy框架的学习(6.item介绍以及items的使用(提前定义好字段名))转载https://blog.csdn.net/wei18791957243/article/details/86259688
在Scrapy框架中的items.py的作用 1.可以预先定义好要爬取的字段 items.py import scrapy class TencentItem(scrapy.I ...
- scala学习(idea编译过程https://blog.csdn.net/guiying712/article/details/68947747)
scala官网 https://www.scala-lang.org/ 菜鸟教程学习 http://www.runoob.com/scala/scala-basic-syntax.html w3sch ...
- jeecms 强大的采集功能优化 转载 https://blog.csdn.net/jeff06143132/article/details/7099003
========================================================= 没办法附件上传不了,AcquisitionSvcImpl.java类: //---- ...
- Mac OS X下把 /etc/sudoers 写错了怎么办?(转载https://blog.csdn.net/robertsong2004/article/details/53725285)
重要的事情先说一下,首先为了回避这个问题,一定要用 visudo 来改 /etc/sudoers 文件. 问题描述: 1. 用 sudo vi 直接改 /etc/sudoers 并覆盖原文件. 2. ...
随机推荐
- Input.GetAxis 获取轴
static function GetAxis (axisName : string) : float Description描述 Returns the value of the virtual a ...
- mysql返回记录的ROWNUM(转)
set @rownum = 0; select (@rownum := @rownum + 1) as rownum, name, scores from user order by scores ...
- 基于webmagic的种子网站爬取
代码地址如下:http://www.demodashi.com/demo/12175.html 1. 概述 因为无聊,闲来没事做,故突发奇想,爬个种子,顺便学习爬虫.本文将介绍使用Spring/Myb ...
- mongodb在Windows安装配置及遇到的问题、java连接测试
一.安装 1.访问mongodb的官网http://www.mongodb.org/downloads下载64bit的包,我下载的是mongodb-win32-x86_64-2008plus-ssl- ...
- C# const和static readonly区别
[转]C# const和static readonly区别 以前只是知道Const和static readonlyd的区别在于const的值是在编译期间确定的,而static readonly是在运行 ...
- Windows下静态库、动态库的创建和调用过程
静态库和动态库的使用包括两个方面,1是使用已有的库(调用过程),2是编写一个库供别人使用(创建过程).这里不讲述过多的原理,只说明如何编写,以及不正确编写时会遇见的问题. //注:本文先从简单到复杂, ...
- oracle中位图索引和B-tree索引的区别
1.适用系统的不同:位图索引适合OLAP系统,而B-tree索引适合OLTP系统. 2.占用存储空间不同:位图索引只需要很小的存储空间,而B-tree索引需要占用很大的存储空间. 3.创建需要的时间不 ...
- hdu2767之强联通缩点
Proving Equivalences Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Oth ...
- Linux安装php-7.0.16,完成php和apache的配置
Linux安装php-7.0.16,完成php和apache的配置 版本:php-7.0.16.tar.gz,libxml2-2.9.2.tar.gz(php需要它的支持,首先安装它) 说明 ...
- ubuntu 16.04安装visual studio code 提示libnss3版本低:NSS >= 3.26 is required
Linux Ubuntu 1604安装VS CODE之后,执行./code报错误: [3781:0914/160851.489979:FATAL:nss_util.cc(632)] NSS_Versi ...