我正在尝试在不使用 Javascript 的情况下为 thead 获取一个固定的表头。这是我的表的基本设置:
<table>
<thead>
<tr>
<th>...</th>
<th>...</th>
<th>...</th>
<tr>
</thead>
<tbody>
...
</tbody>
</table>
我尝试使用 css,但没有成功。我有一个固定的标题,但它的宽度很小而且不可调节。
.thead {
position:fixed;
top:0;
width:100%;
}