【发布时间】:2017-09-23 08:03:00
【问题描述】:
我正在尝试在不使用 Javascript 的情况下为 thead 获取一个固定的表头。这是我的桌子的基本设置:
<table>
<thead>
<tr>
<th>...</th>
<th>...</th>
<th>...</th>
<tr>
</thead>
<tbody>
...
</tbody>
</table>
我尝试使用 css,但没有成功。我有一个固定的标题,但它的宽度很小而且不可调节。
.thead {
position:fixed;
top:0;
width:100%;
}
【问题讨论】:
-
thead 不是一个类。消除 。在 css 中插入之前
标签: css html-table css-position tableheader