假设我有以下内容:
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th>#</th>
<th>Table heading</th>
<th>Table heading</th>
<th>Table heading</th>
<th>Table heading</th>
<th>Table heading</th>
/* ... more table headers */
</tr>
</thead>
<tbody>
<tr>
<td>ID 1</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
</tr>
<tr>
<td>ID 2</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
<td>Table cell</td>
</tr>
/* ... more table rows */
</tbody>
</table>
Run Code Online (Sandbox Code Playgroud)
我希望添加更多表头,并最终使表格可水平滚动.是否可以使第一列(包含ID的列)保持固定,因此无论用户水平滚动多少,都始终可见?
我想在这里创建的是使用jQuery插件:http://www.novasoftware.com/Download/jQuery_FixedTable/JQuery_FixedTable.aspx(现场演示:http: //www.novasoftware.com/Download/jQuery_FixedTable/ jQuery_FixedTable_Demo.htm)