基本的な Bootstrap のテーブルには、小さなパディングと横方向の区切線だけがあります。
.table
クラスは、テーブルに基本的なスタイルを追加します:
Firstname | Lastname | |
---|---|---|
John | Doe | john@example.com |
Mary | Moe | mary@example.com |
July | Dooley | july@example.com |
.table-striped
クラスは、テーブルにストライプを追加します:
Firstname | Lastname | |
---|---|---|
John | Doe | john@example.com |
Mary | Moe | mary@example.com |
July | Dooley | july@example.com |
.table-bordered
クラスは、テーブルとセルの四辺すべてにボーダーを追加します:
Firstname | Lastname | |
---|---|---|
John | Doe | john@example.com |
Mary | Moe | mary@example.com |
July | Dooley | july@example.com |
.table-hover
クラスは、テーブルの行にホバー状態を有効にします:
Firstname | Lastname | |
---|---|---|
John | Doe | john@example.com |
Mary | Moe | mary@example.com |
July | Dooley | july@example.com |
.table-condensed
クラスは、セルパディングを半分にカットすることにより、テーブルをよりコンパクトにします:
Firstname | Lastname | |
---|---|---|
John | Doe | john@example.com |
Mary | Moe | mary@example.com |
July | Dooley | july@example.com |
コンテキスト・クラスは、テーブル行(<tr>
)またはテーブルセル(<td>
)を
着色するために使用することができます:
Firstname | Lastname | |
---|---|---|
John | Doe | john@example.com |
Mary | Moe | mary@example.com |
July | Dooley | july@example.com |
使用することができるコンテキストクラスは次の通りです:
クラス | 説明 |
---|---|
.active |
テーブルの行またはテーブルセルにホバーしたときの色を適用します |
.success |
成功または積極的な行動を表します |
.info |
有益な変化またはアクションにニュートラルであることを表します |
.warning |
注意が必要かもしれない警告を表します |
.danger |
危険または潜在的に否定的な行動を表します |
.table-responsive
クラスは、レスポンシブ・テーブルを作成します。
小型デバイス(768px 以下)の時には、テーブルは縦にスクロールします。
幅が 768px より大きいときは、表示する上では何の違いもありません:
Exercise 1 » Exercise 2 » Exercise 3 » Exercise 4 » Exercise 5 » Exercise 6 »
全 table クラスの完全なリファレンスは、 Bootstrap テーブル・リファレンスをご覧ください。