【发布时间】:2014-05-15 01:53:07
【问题描述】:
我想要一个具有 html 标头和表格标头的 html 页面具有不可滚动的功能。只有表格内容应该是可滚动的。
例如:
<html>
<body>
<h1>header</h1>
<h1>header2</h1>
<table>
<thead>
<tr>
<th>name</th>
</tr>
<tr>
<th>address</th>
</tr>
</thead>
<tbody>
<tr>
<td>Venkat</td>
</tr>
<tr>
<td>bangalore</td>
</tr>
//this part will be repeating
</tbody>
</table>
</body>
</html>
我只希望表格正文中的内容可以滚动。
我也参考了以下链接How do you create non scrolling div at the top of an HTML page without two sets of scroll bars
但我不能使用 div 只包含标题和表头..
我创建了一个与我类似的情况的小提琴。请看http://jsfiddle.net/VenkateshManohar/bU7NN/
【问题讨论】: