现在的位置: 首页 > 综合 > 正文

用带滚动条的div节省空间

2013年09月18日 ⁄ 综合 ⁄ 共 1246字 ⁄ 字号 评论关闭

来自:http://blog.csdn.net/hell8088/archive/2007/11/27/1903755.aspx

<table style="width: 500px;" border="1" cellspacing="0" cellpadding="0">

<tbody>

<tr>

<td style="height: 19px; text-align: left;">

<!--超过220自动加滚动条-->

<div id="div2" style="overflow: auto; height: 220px;">

<table style="width: 90%;" border="0" cellspacing="0" cellpadding="0">

<tbody>

<tr>

<td>DIV滚动效果<br />

                                        DIV滚动效果<br />

                                        DIV滚动效果<br />

                                        DIV滚动效果<br />

                                        DIV滚动效果<br />

                                        DIV滚动效果<br />

                                        DIV滚动效果<br />

                                        DIV滚动效果<br />

                                        DIV滚动效果<br />

                                        DIV滚动效果<br />

                                        DIV滚动效果<br />

                                        DIV滚动效果<br />

                                        DIV滚动效果<br />

                                        DIV滚动效果<br />

                                        DIV滚动效果

<p>&nbsp;</p>

<p>&nbsp;</p>

</td>

</tr>

</tbody>

</table>

</div>

</td>

</tr>

</tbody>

</table>

效果如下:

DIV滚动效果

DIV滚动效果

DIV滚动效果

DIV滚动效果

DIV滚动效果

DIV滚动效果

DIV滚动效果

DIV滚动效果

DIV滚动效果

DIV滚动效果

DIV滚动效果

DIV滚动效果

DIV滚动效果

DIV滚动效果

DIV滚动效果

 

 

抱歉!评论已关闭.