我需要強調的是,這與第一列固定的水平滾動有關,因爲大多數答案都爲我提供了垂直滾動的解決方案。固定第一個標題欄和固定列的表
是否有可能使用純CSS水平滾動的表,但第一個標題和第一列是固定與其餘內容可滾動?
例如,如果我有這個表:
<table>
<thead>
<tr>
<th class="head1">Head 1</th>
<th class="head2">Head 2</th>
<th class="head2">Head 3</th>
</tr>
</thead>
<tbody>
<tr>
<td class="col1">Col 1</td>
<td class="col2">Col 2</td>
<td class="col3">Col 3</td>
</tr>
</tbody>
</table>
頭1和COL1總是與滾動其他列中顯示。
已經回答了這裏:https://stackoverflow.com/questions/17067294/html-table-with-100-width-with-vertical-scroll-inside-tbody – Lorenz 2014-11-21 16:47:08
這個回答可以幫助你還有: http://stackoverflow.com/questions/17827908/how-to-make-fixed-header-table-inside-scrollable-div – Adriansyah 2014-11-21 16:49:13
我要求固定的第一列水平滾動,所以這些鏈接都沒有關聯。 – dagda1 2014-11-21 16:59:37