我有一个简单的 div 标签:我需要将 thead 固定在 tbody 上方。我需要将它们放在同一个 div、同一个表中。使用下面的代码,我的标题在正文上方。我怎样才能将 tbody 向下推几个槽口,所以当我滚动时,标题是固定的,只有身体移动
<div STYLE=" height: 120px; width: 100px; font-size: 12px; overflow: auto;">
<table bgcolor="green">
<thead style="position:fixed;">
<tr><td bgcolor="#fafafa">hello</td></tr>
</thead>
<tbody >
<tr><td bgcolor="#dadada">www.hioxindia.com</td></tr>
<tr><td >maths.hscripts.com</td></tr>
<tr><td bgcolor="#dadada">www.hscripts.com</td></tr>
<tr><td>free php scripts</td></tr>
<tr><td bgcolor="#dadada">www.hiox4u.com</td></tr>
</tbody>
</table>
</div>
必须在 IE 上工作 对于上述 div... 我需要在表格顶部添加带有固定标题的滚动条。中间不应包含额外的 div 或表格。我需要 thead 和 tbody 在同一个表中