Twitter Bootstrap2.3.1で縞模様テーブルを指定します。
【準備】
1.「Twitter Bootstrap2.3.1の使用方法」の手順の通り、Twitter Bootstrapを配置しておきます。
【手順1】
1.HTMLファイル「index.html」(任意)を作成。
2.「index.html」を以下の様に入力。
<!DOCTYPE html>
<html>
<head>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" />
</head>
<body>
<table class="table table-striped">
<caption>テーブルのタイトル</caption>
<thead>
<tr>
<th>名前</th>
<th>年齢</th>
<th>性別</th>
</tr>
</thead>
<tbody>
<tr>
<td>あいうえお</td>
<td>11</td>
<td>男</td>
</tr>
<tr>
<td>かきくけこ</td>
<td>22</td>
<td>女</td>
</tr>
<tr>
<td>さしすせそ</td>
<td>33</td>
<td>男</td>
</tr>
</tbody>
</table>
<script src="http://code.jquery.com/jquery.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
【手順2】
1.「table-striped」クラスは以下の様に定義されていました。
.table-striped tbody > tr:nth-child(odd) > td,
.table-striped tbody > tr:nth-child(odd) > th {
background-color: #f9f9f9;
}
【手順3】
1.ブラウザで「index.html」を開き、以下の様に表示されれば成功です。
以上です。
-01.png)








-01.png)
-01.png)






-01.png)
-01.png)
-01.png)
-01.png)















-03.png)
















