Odniesienie do tabel CSS Bootstrap


<tabela> Klasy

Użyj poniższych klas, aby wystylizować dowolną tabelę: 

Class Description Example
.table Adds basic styling (light padding and only horizontal dividers) to any <table>
.table-striped Adds zebra-striping to any table row within <tbody> (not available in IE8)
.table-bordered Adds border on all sides of the table and cells
.table-hover Enables a hover state on table rows within a <tbody>
.table-condensed Makes table more compact by cutting cell padding in half
Combining all the table classes

Klasy <tr>, <th> i <td>

Użyj poniższych klas, aby pokolorować wiersze lub komórki tabeli:

Class Description Example
.active Applies the hover color (light-grey) to a particular row or cell
.success Indicates a successful or positive action
.info Indicates a neutral informative change or action
.warning Indicates a warning that might need attention
.danger Indicates a dangerous or potentially negative action

Responsywne tabele

Klasa .table-responsive tworzy responsywną tabelę. Tabela będzie następnie przewijana w poziomie na małych urządzeniach (poniżej 768px). Podczas oglądania na dowolnych obrazach o szerokości większej niż 768px nie ma różnicy:

Przykład

<div class="table-responsive">
  <table class="table">
    ...
  </table>
</div>