Код: Выделить всё
<table>
<thead>
</thead>
<tbody>
</tbody>
</table>
Код: Выделить всё
<table>
<thead style="position:sticky; top:50px">
</thead>
<tbody>
</tbody>
</table>
Код: Выделить всё
<table>
<thead>
</thead>
<tbody>
</tbody>
</table>
Код: Выделить всё
<table>
<thead style="position:sticky; top:50px">
</thead>
<tbody>
</tbody>
</table>
Код: Выделить всё
.table-fixed {
overflow: auto;
height: 500px;
}
.table-fixed-header thead th {
position: sticky;
top: 0;
z-index: 1;
background:#eee;
}
.table-fixed-first-column tbody td:first-child {
position: sticky;
left: 0;
background:#eee;
}
Код: Выделить всё
<div class="table-responsive table-fixed table-fixed-header table-fixed-first-column">
<table class="table">
<thead>
<tr>
<th>...</th>
</tr>
</thead>
<tbody>
<tr>
<td>...</td>
</tr>
</tbody>
</table>
</div>