2010-02-03 36 views

回答

1

考慮到您正在使用固定比例的表格,這可能會稍微容易一些。只需在想要垂直滾動的列內創建一個DIV,併爲其添加您喜歡的固定維度並將其添加到「overflow-y:auto」屬性。如果div的內容超過可視區域,verflow-y屬性將確保只顯示滾動條。示例:


<style type="text/css"> 
.scrollable { width:300px; height:400px; overflow-y:auto; overflow-x:hidden; clip-rect:(0px, 300px, 400px, 0px); } 
</style> 
<table width="500" height="500" cellpadding="0" cellspacing="0" border="0"> 
    <tr height="100"> 
     <td colspan="2">Banner</td> 
    </tr> 
    <tr height="400" valign="top"> 
     <td width="200">Left Column</td> 
     <td width="300"><div class="scrollable">Scrollable area<br><br><br><br><br><br><br><br><br><br><br>Scrollable area<br><br><br><br><br><br><br><br><br><br><br></div></td> 
    </tr> 
</table>