bootstrap学习笔记-CSS-表格

原创
2013/06/15 20:47
阅读数 142
<!doctype html>
<html>
<head>
<meta charset="gbk">
<title>布局学习</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link href="../css/bootstrap.min.css" rel="stylesheet">
<link href="../css/bootstrap-responsive.min.css" rel="stylesheet">
</head>
<body class="container">
<h1 class="page-header">表格<small>简单示例</small></h1>
<h2>默认表格</h2>
<table class="table">
  <thead>
    <tr>
      <th>#</th>
      <th>姓名</th>
      <th>年龄</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>AGE</td>
      <td>35</td>
    </tr>
    <tr>
      <td>1</td>
      <td>AGE</td>
      <td>35</td>
    </tr>
    <tr>
      <td>1</td>
      <td>AGE</td>
      <td>35</td>
    </tr>
  </tbody>
</table>


<h2>带边框的表格</h2>
<table class="table-bordered table">
  <thead>
    <tr>
      <th>#</th>
      <th>姓名</th>
      <th>年龄</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>AGE</td>
      <td>35</td>
    </tr>
    <tr>
      <td>1</td>
      <td>AGE</td>
      <td>35</td>
    </tr>
    <tr>
      <td>1</td>
      <td>AGE</td>
      <td>35</td>
    </tr>
  </tbody>
</table>

<h2>条纹表格</h2>
<table class="table table-striped ">
  <thead>
    <tr>
      <th>#</th>
      <th>姓名</th>
      <th>年龄</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>AGE</td>
      <td>35</td>
    </tr>
    <tr>
      <td>1</td>
      <td>AGE</td>
      <td>35</td>
    </tr>
    <tr>
      <td>1</td>
      <td>AGE</td>
      <td>35</td>
    </tr>
  </tbody>
</table>

<h2>压缩表格</h2>
<table class="table-condensed table">
  <thead>
    <tr>
      <th>#</th>
      <th>姓名</th>
      <th>年龄</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>AGE</td>
      <td>35</td>
    </tr>
    <tr>
      <td>1</td>
      <td>AGE</td>
      <td>35</td>
    </tr>
    <tr>
      <td>1</td>
      <td>AGE</td>
      <td>35</td>
    </tr>
  </tbody>
</table>
<h2>全部表格</h2>
<table class="table-condensed table-striped table-bordered table">
  <thead>
    <tr>
      <th>#</th>
      <th>姓名</th>
      <th>年龄</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>AGE</td>
      <td>35</td>
    </tr>
    <tr>
      <td>1</td>
      <td>AGE</td>
      <td>35</td>
    </tr>
    <tr>
      <td>1</td>
      <td>AGE</td>
      <td>35</td>
    </tr>
  </tbody>
</table>

</body>
</html>
展开阅读全文
打赏
0
2 收藏
分享
加载中
更多评论
打赏
0 评论
2 收藏
0
分享
返回顶部
顶部