看程序学bootstrap3-基本样式之表格

示例 1 : 基本表格

<!DOCTYPE html>
<script src="http://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
 
<table class="table">
  <thead>
     <th>头像</th>
     <th>名字</th>
     <th>HP</th>
  </thead>
  <tbody>
     <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/gareen.png"/></td> 
        <td>盖伦</td> 
        <td>616</td> 
     </tr>
 <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/teemo.png"/></td> 
        <td>提莫</td> 
        <td>383</td> 
     </tr>
 <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/akali.png"/></td> 
        <td>阿卡丽</td> 
        <td>448</td> 
     </tr>
  </tbody>
</table>

示例 2 : 带斑马线的表格

<!DOCTYPE html>
<script src="http://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
 
<table class="table table-striped">
  <thead>
     <th>头像</th>
     <th>名字</th>
     <th>HP</th>
  </thead>
  <tbody>
     <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/gareen.png"/></td> 
        <td>盖伦</td> 
        <td>616</td> 
     </tr>
 <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/teemo.png"/></td> 
        <td>提莫</td> 
        <td>383</td> 
     </tr>
 <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/akali.png"/></td> 
        <td>阿卡丽</td> 
        <td>448</td> 
     </tr>
  </tbody>
</table>

示例 3 : 带边框的表格

<!DOCTYPE html>
<script src="http://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
 
<table class="table table-bordered">
  <thead>
     <th>头像</th>
     <th>名字</th>
     <th>HP</th>
  </thead>
  <tbody>
     <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/gareen.png"/></td> 
        <td>盖伦</td> 
        <td>616</td> 
     </tr>
 <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/teemo.png"/></td> 
        <td>提莫</td> 
        <td>383</td> 
     </tr>
 <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/akali.png"/></td> 
        <td>阿卡丽</td> 
        <td>448</td> 
     </tr>
  </tbody>
</table>

示例 4 : 有鼠标悬停状态的表格

<!DOCTYPE html>
<script src="http://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
 
<table class="table table-hover">
  <thead>
     <th>头像</th>
     <th>名字</th>
     <th>HP</th>
  </thead>
  <tbody>
     <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/gareen.png"/></td> 
        <td>盖伦</td> 
        <td>616</td> 
     </tr>
 <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/teemo.png"/></td> 
        <td>提莫</td> 
        <td>383</td> 
     </tr>
 <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/akali.png"/></td> 
        <td>阿卡丽</td> 
        <td>448</td> 
     </tr>
  </tbody>
</table>

示例 5 : 更加紧凑的表格

<!DOCTYPE html>
<script src="http://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
 
<table class="table table-condensed">
  <thead>
     <th>头像</th>
     <th>名字</th>
     <th>HP</th>
  </thead>
  <tbody>
     <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/gareen.png"/></td> 
        <td>盖伦</td> 
        <td>616</td> 
     </tr>
 <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/teemo.png"/></td> 
        <td>提莫</td> 
        <td>383</td> 
     </tr>
 <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/akali.png"/></td> 
        <td>阿卡丽</td> 
        <td>448</td> 
     </tr>
  </tbody>
</table>
试一下

示例 6 : 多种表格效果整合在一起

<!DOCTYPE html>
<script src="http://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
 
<table class="table table-striped table-bordered table-hover  table-condensed">
  <thead>
     <th>头像</th>
     <th>名字</th>
     <th>HP</th>
  </thead>
  <tbody>
     <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/gareen.png"/></td> 
        <td>盖伦</td> 
        <td>616</td> 
     </tr>
 <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/teemo.png"/></td> 
        <td>提莫</td> 
        <td>383</td> 
     </tr>
 <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/akali.png"/></td> 
        <td>阿卡丽</td> 
        <td>448</td> 
     </tr>
  </tbody>
</table>

示例 7 : 激活样式

<!DOCTYPE html>
<script src="http://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
 
<table class="table">
  <thead>
     <th>头像</th>
     <th>名字</th>
     <th>HP</th>
  </thead>
  <tbody>
     <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/gareen.png"/></td> 
        <td>盖伦</td> 
        <td >616</td> 
     </tr>
 <tr>
        <td ><img width="20px" src="http://how2j.cn/study/bootstrap/lol/teemo.png"/></td> 
        <td >提莫</td> 
        <td >383</td> 
     </tr>
 <tr  class="active">
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/akali.png"/></td> 
        <td>阿卡丽</td> 
        <td>448</td> 
     </tr>
  </tbody>
</table>

示例 8 : 成功样式

<!DOCTYPE html>
<script src="http://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
 
<table class="table">
  <thead>
     <th>头像</th>
     <th>名字</th>
     <th>HP</th>
  </thead>
  <tbody>
     <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/gareen.png"/></td> 
        <td>盖伦</td> 
        <td >616</td> 
     </tr>
 <tr>
        <td ><img width="20px" src="http://how2j.cn/study/bootstrap/lol/teemo.png"/></td> 
        <td >提莫</td> 
        <td >383</td> 
     </tr>
 <tr  class="success">
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/akali.png"/></td> 
        <td>阿卡丽</td> 
        <td>448</td> 
     </tr>
  </tbody>
</table>

示例 9 : 信息样式

<!DOCTYPE html>
<script src="http://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
 
<table class="table">
  <thead>
     <th>头像</th>
     <th>名字</th>
     <th>HP</th>
  </thead>
  <tbody>
     <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/gareen.png"/></td> 
        <td>盖伦</td> 
        <td >616</td> 
     </tr>
 <tr>
        <td ><img width="20px" src="http://how2j.cn/study/bootstrap/lol/teemo.png"/></td> 
        <td >提莫</td> 
        <td >383</td> 
     </tr>
 <tr  class="info">
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/akali.png"/></td> 
        <td>阿卡丽</td> 
        <td>448</td> 
     </tr>
  </tbody>
</table>

示例 10 : 警告样式

<!DOCTYPE html>
<script src="http://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
 
<table class="table">
  <thead>
     <th>头像</th>
     <th>名字</th>
     <th>HP</th>
  </thead>
  <tbody>
     <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/gareen.png"/></td> 
        <td>盖伦</td> 
        <td >616</td> 
     </tr>
 <tr>
        <td ><img width="20px" src="http://how2j.cn/study/bootstrap/lol/teemo.png"/></td> 
        <td >提莫</td> 
        <td >383</td> 
     </tr>
 <tr  class="warning">
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/akali.png"/></td> 
        <td>阿卡丽</td> 
        <td>448</td> 
     </tr>
  </tbody>
</table>

示例 11 : 危险样式

<!DOCTYPE html>
<script src="http://how2j.cn/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://how2j.cn/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://how2j.cn/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
 
<table class="table">
    <thead>
     <th>头像</th>
     <th>名字</th>
     <th>HP</th>
  </thead>
  <tbody>
     <tr>
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/gareen.png"/></td> 
        <td>盖伦</td> 
        <td >616</td> 
     </tr>
 <tr>
        <td ><img width="20px" src="http://how2j.cn/study/bootstrap/lol/teemo.png"/></td> 
        <td >提莫</td> 
        <td >383</td> 
     </tr>
 <tr  class="danger">
        <td><img width="20px" src="http://how2j.cn/study/bootstrap/lol/akali.png"/></td> 
        <td>阿卡丽</td> 
        <td>448</td> 
     </tr>
  </tbody>
</table>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值