bootstrap学习笔记-CSS-表格

<!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>

你可能感兴趣的:(html,bootstrap,布局)