Bootstrap学习总结笔记(2)-- 基本样式之表格
来源:互联网 发布:大数据时代阅读答案 编辑:程序博客网 时间:2024/05/22 12:37
Bootstrap实现了大量基本样式,包括表格、表单、按钮、图片等。基本的使用方法是通过添加特定的class来实现。
Bootstrap 提供了一个清晰的创建表格的布局。
0x01 表格样式
(1)基本样式:不带边框和分割线:
<!DOCTYPE html><html lang="zh-cn"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="../../css/bootstrap.min.css" rel="stylesheet"> <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script> <script src="../../js/bootstrap.min.js"></script> <title>表格</title></head><body><div class="container"> <table class="table"> <tr> <td>序号</td> <td>姓名</td> <td>年龄</td> </tr> <tr> <td>1</td> <td>kikay</td> <td>20</td> </tr> <tr> <td>2</td> <td>Tom</td> <td>18</td> </tr> <tr> <td>1</td> <td>小花</td> <td>21</td> </tr> </table></div></body></html>
(2)样式.table-bordered:为表格带上边框:
<table class="table table-bordered table-striped">
(3)样式.table-striped:为表格带上斑马线:
<table class="table table-striped">
(4)样式:.table-hover:为鼠标悬浮在表格行上指定不同颜色:
<table class="table table-hover">
(5)样式:.table-condensed:使表格更加紧凑:
<table class="table table-condensed">
0x02 状态标识
还可以为表格中行或者单元格添加状态样式,比如:
<!DOCTYPE html><html lang="zh-cn"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="../../css/bootstrap.min.css" rel="stylesheet"> <script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script> <script src="../../js/bootstrap.min.js"></script> <title>带上边框</title></head><body><div class="container"> <table class="table table-bordered table-striped table-hover table-condensed"> <tr class="alert-danger"> <td class=>序号</td> <td>姓名</td> <td>年龄</td> </tr> <tr class="success"> <td>1</td> <td>kikay</td> <td>20</td> </tr> <tr class="alert-warning"> <td>2</td> <td>Tom</td> <td>18</td> </tr> <tr> <td>1</td> <td>小花</td> <td>21</td> </tr> </table></div></body></html>
0 0
- Bootstrap学习总结笔记(2)-- 基本样式之表格
- Bootstrap学习总结笔记(3)-- 基本样式之表单
- Bootstrap学习总结笔记(4)-- 基本样式之按钮
- Bootstrap学习总结笔记(5)-- 基本样式之标签
- Bootstrap学习总结笔记(6)-- 基本样式之图片
- Bootstrap学习总结笔记(10)-- 基本组件之导航
- Bootstrap学习总结笔记(12)-- 基本组件之分页
- Bootstrap学习总结笔记(13)-- 基本组件之缩略图
- Bootstrap学习总结笔记(14)-- 基本组件之面板
- Bootstrap学习总结笔记(15)-- 基本组件之进度条
- Bootstrap学习总结笔记(21)-- 基本插件之按钮
- Bootstrap学习总结笔记(22)-- 基本插件之折叠
- Bootstrap学习笔记之全局CSS样式(一)
- 学习笔记之bootstrap+thinkphp分页样式
- Bootstrap学习总结笔记(8)-- 基本组件之按钮组
- Bootstrap学习总结笔记(9)-- 基本组件之input输入框组
- Bootstrap学习总结笔记(11)-- 基本组件之列表组
- Bootstrap学习总结笔记(16)-- 基本插件之模态对话框
- chrome浏览器的跨域设置
- html 网页代码
- 第3章基于PSO的已知静态路径规划方法
- SSH框架增加事务处理(以原有的SSH框架登录)
- 消除任意字符
- Bootstrap学习总结笔记(2)-- 基本样式之表格
- 关于Android RecyclerView比较好的几篇文章转载
- RTMPdump源码分析: NetStream1(7)
- 机器学习2——分类和逻辑回归Classification and logistic regression(牛顿法待研究)
- C++67
- Ubuntu虚拟机简明教程
- AngularJS初探:搭建PhoneCat项目的开发与测试环境
- CFStringTransform
- Android Handler机制