Bootstrap入门(四)表格
<table>标签
首先,引入bootstrap的css文件,然后表格内容放在一个class为table的<table>标签中(class="table"补足了padding和水平方向上的分割线)
<table class="table">
...
</table>
1.几个不同样式的表格(修改<table>标签中的class)
1.1“table”普通

           <table class="table">
<thead>
<tr>
<th>biaoti</th>
<th>biaoti</th>
<th>biaoti</th>
</tr>
</thead>
<tbody>
<tr>
<th>danyuange</th>
<th>danyuange</th>
<th>danyuange</th>
</tr>
<tr>
<th>danyuange</th>
<th>danyuange</th>
<th>danyuange</th>
</tr>
<tr>
<th>danyuange</th>
<th>danyuange</th>
<th>danyuange</th>
</tr>
</tbody>
</table>

效果:

1.2<table>标签中的class 改为“ table table-striped ”两行之前有不同的颜色(“斑马线”)
效果:

1.3<table>标签中的class 改为 “ table table-striped table-bordered ”多了水平方向上的分割线和边框
效果:

1.4<table>标签中的class 改为 “ table table-striped table-bordered table-hover ”鼠标经过、悬停时有效果
 
2.状态类(在<tr>标签中修改class)
跟之前的类似,有active,info,success,warning,danger等来为单元格添加标识 

                <table class="table table-striped table-bordered">
<thead>
<tr class="active">
<th>biaoti</th>
<th>biaoti</th>
<th>biaoti</th>
</tr>
</thead>
<tbody>
<tr class="success">
<th>danyuange</th>
<th>danyuange</th>
<th>danyuange</th>
</tr>
<tr class="info">
<th>danyuange</th>
<th>danyuange</th>
<th>danyuange</th>
</tr>
<tr class="warning">
<th>danyuange</th>
<th>danyuange</th>
<th>danyuange</th>
</tr>
<tr class="danger">
<th>danyuange</th>
<th>danyuange</th>
<th>danyuange</th>
</tr>
</tbody>
</table>

效果:

 
3.响应式效果
把内容放在一个class为table-responsive的div中
<table>的class改为“table table-condensed”
在浏览器变小的时候,不会影响表格内容,而是下方多一条滚动条
效果:

Bootstrap入门(2)表格的更多相关文章

  1. Bootstrap入门(四)表格

    Bootstrap入门(四)表格 <table>标签 首先,引入bootstrap的css文件,然后表格内容放在一个class为table的<table>标签中(class=& ...

  2. bootstrap 入门

    bootstrap 入门 <!DOCTYPE html> <html> <head lang="en"> <meta charset=&q ...

  3. Bootstrap入门(十五)组件9:面板组件

    Bootstrap入门(十五)组件9:面板组件 虽然不总是必须,但是某些时候你可能需要将某些 DOM 内容放到一个盒子里.对于这种情况,可以试试面板组件. 1.基本实例 2.带标题的面板 3.情景效果 ...

  4. Bootstrap <基础五>表格

    Bootstrap 提供了一个清晰的创建表格的布局.下表列出了 Bootstrap 支持的一些表格元素: 标签 描述 <table> 为表格添加基础样式. <thead> 表格 ...

  5. 01.Bootstrap入门

    Bootstrap介绍: Bootstrap,来自 Twitter,是目前很受欢迎的前端框架.Bootstrap 是基于 HTML.CSS.JAVASCRIPT 的,它简洁灵活,使得 Web 开发更加 ...

  6. Bootstrap入门(二)栅格

    Bootstrap入门(二)栅格 Bootstrap入门(二)栅格 全局CSS样式--栅格 先引入本地的CSS文件(根据自己的文件夹,有不同的引入地址,我是放在一个新建的名为css的文件夹中) con ...

  7. BootStrap入门教程 (一)

    BootStrap入门教程 (一)   2011年,twitter的"一小撮"工程师为了提高他们内部的分析和管理能力,用业余时间为他们的产品构建了一套易用.优雅.灵活.可扩展的前端 ...

  8. Bootstrap入门(三十)JS插件7:警告框

    Bootstrap入门(三十)JS插件7:警告框 通过这个插件可以为警告信息添加点击以及消失的功能. 当使用一个.close按钮,它必须是第一个子元素.alert-dismissible,并没有文字内 ...

  9. Bootstrap入门(二十九)JS插件6:弹出框

    Bootstrap入门(二十九)JS插件6:弹出框 加入小覆盖的内容,像在iPad上,用于存放非主要信息 弹出框是依赖于工具提示插件的,那它也和工具提示是一样的,是需要初始化才能够使用的 首先我们引入 ...

随机推荐

  1. elasticsearch index 过程

    (1)index request 到某一个Node(选择node的方式是采用round-robin)方法,此node 称为coordinate node,继续当前index request应该执行在哪 ...

  2. 使用javacv 截取视频指定帧节

    个人博客 地址:https://www.wenhaofan.com/article/20190407105818 引入依赖 <dependency> <groupId>org. ...

  3. OCM 12c | OCM 12c Update | OCM 11g (Retiring Dec 31, 2019) | OCM 11g考试延期至2020.04.30

     OCM 全球考试安排时间表 View A Worldwide OCM Schedule Oracle Database 12c Certified Master Exam (OCM) OCM 12c ...

  4. mysql 行锁 表锁

    MySQL数据库 - 引擎: - innodb - 支持事务 - 锁 - 行锁 - 表锁 - 示例: - 终端: begin; select xx from xx for update; commit ...

  5. js动画函数

    var tween = { linear: function (t, b, c, d) { return c * t / d + b; }, easeIn: function (t, b, c, d) ...

  6. 爬虫爱用的一些python技巧

    1.正则表达式 有时候提取到的数据不规整,需要用正则来匹配所需要展现出来的数据 学习链接:https://www.cnblogs.com/-chenxs/p/11352172.html,https:/ ...

  7. CodeForces 1144C

    链接 https://vjudge.net/problem/CodeForces-1144C #include<bits/stdc++.h> using namespace std; in ...

  8. Ubuntu18.04安装phpMyAdmin

    1.使用apt自动安装 sudo apt install phpmyadmin 2.安装完成后,创建软链接到web根目录下(我的是/var/www/html/) sudo ln -s /usr/sha ...

  9. jsp报错java.io.IOException: Stream closed

    在使用jsp的时候莫名其妙的抛出了这个异常,经过反复检查 去掉了网友们说的jsp使用流未关闭,以及tomcat版本冲突等原因,最后发现是书写格式的原因. 当时使用的代码如下 <jsp:inclu ...

  10. 根据JSON的值设置radio选中状态

    说明:页面有一组单选按钮radio,现在页面发送请求得到一组json数据,包括radio的值. 需要根据JSON中的值绑定radio的选中状态> <table class="ta ...