代表全体
I am developing a webpage in which I am using a table to show the contents. In the table I have a header part and a content part.
传真:
<div style="height:100px;overflow:auto;">
<table>
<thead>
<tr>
<td>ID</td>
<td>Name</td>
<td>Address</td>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Test Name</td>
<td>Test Address</td>
</tr>
<tr>
<td>2..</td>
<td>Test Name1..</td>
<td>Test Address123..</td>
</tr>
<tr>
<td>1</td>
<td>Test Name</td>
<td>Test Address</td>
</tr>
<tr>
<td>2..</td>
<td>Test Name1..</td>
<td>Test Address123..</td>
</tr>
<tr>
<td>1</td>
<td>Test Name</td>
<td>Test Address</td>
</tr>
<tr>
<td>2..</td>
<td>Test Name1..</td>
<td>Test Address123..</td>
</tr>
<tr>
<td>1</td>
<td>Test Name</td>
<td>Test Address</td>
</tr>
<tr>
<td>2..</td>
<td>Test Name1..</td>
<td>Test Address123..</td>
</tr>
<tr>
<td>1</td>
<td>Test Name</td>
<td>Test Address</td>
</tr>
<tr>
<td>2..</td>
<td>Test Name1..</td>
<td>Test Address123..</td>
</tr>
<tr>
<td>1</td>
<td>Test Name</td>
<td>Test Address</td>
</tr>
<tr>
<td>2..</td>
<td>Test Name1..</td>
<td>Test Address123..</td>
</tr>
<tr>
<td>1</td>
<td>Test Name</td>
<td>Test Address</td>
</tr>
<tr>
<td>2..</td>
<td>Test Name1..</td>
<td>Test Address123..</td>
</tr>
<tbody>
</table>
</div>
CSS:
thead tr {
position:relative;
top: expression(offsetParent.scrollTop);
}
在记录数量超过一定限度时,我想使标题成为静止部分。 这意味着它不应 with倒记录。
我正在使用上述《特别安全法》,但没有工作。 谁能建议我这样做? 我正在使用IE9。
Thanks, Arvind.