补充,上面写的overflow:auto是当表格内容超出DIV高度范围时自动出现。 如果固定DIV总是出现滚动条。则用overflow:scroll ExampleThe following example illustrates this attribute. <DIV STYLE="position:relative;height:100;width:100; top:0;left:0;background-color:green;overflow:scroll"> put enough text in here that will take up more than 100 x 100 pixels worth of space. View this, and you will see that you will need to use the scroll bars to see the content that won't fit within a 100 x 100 window. </DIV>Applies ToDIV, TEXTAREA, SPAN, FIELDSET
而且好想要写overflow: scroll;吧
不知道啊
请教高手
<table widht=100%>
...
</table>
</div>
如果固定DIV总是出现滚动条。则用overflow:scroll
ExampleThe following example illustrates this attribute. <DIV STYLE="position:relative;height:100;width:100;
top:0;left:0;background-color:green;overflow:scroll">
put enough text in here that will take up more than 100 x 100
pixels worth of space. View this, and you will see that you
will need to use the scroll bars to see the content that won't
fit within a 100 x 100 window.
</DIV>Applies ToDIV, TEXTAREA, SPAN, FIELDSET
div里面有滚动条
而且div的宽度和td的一样啦
<tr>
<td>
<div style="width:100%;height:100%;overflow:auto;border:1px solid red">
<p>testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest</p>
<p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p><p>df</p>
</div>
</td>
</tr>
</table>