具体属性微调 <tr style="position:fixed;top:0px;"> <th>姓名</th> <th>性别</th> <th>职业</th> </tr>
<tr style="position:fixed;top:0px;"> <th>姓名</th> <th>性别</th> <th>职业</th> </tr>
* html .fixed { position: absolute; }
参考一下: Pure CSS Scrollable Table with Fixed Header 上面的是纯css版的,页面里面还提到了一个跨浏览器支持更好的js+css版的
61,129
社区成员
60,711
社区内容
加载中
试试用AI创作助手写篇文章吧