[英]How to add auto-scroll to 'resizable' <div>?
我在div中使用JQuery'resizable'。 当我将一列多列添加到一行中时,它应该水平且超出屏幕空间,然后启用水平滚动条。与垂直滚动条相同。我需要固定高度,如果它在多行中超过了高度另外,它应该启用垂直滚动。 我使用以下代码。
<div id="resizable" class="ui-widget-content">
<h3 class="ui-widget-header">Overview</h3>
<table id="table1" class="table1">
<tr class="even">
<td>
<div id="rowColumn" class="rowColumn">
<select id="ddlNumber" name="ddlNumber" class="ddlNumber" style="height:20px; Width:160px;" >
<option value="1">1</option>
<option value="2">2</option>
</select>
<select id="ddlMatch" name="ddlMatch" class="ddlMatch" style="height:20px; Width:120px;" > </select>
<input type="text" id="textMatchMe" name="textMatchMe" class="textMatchMe" style="height:20px; width:140px"/>
<input type="text" id="textMatchMeNumber" name="textMatchMeNumber" class="textMatchMeNumber" style="height:20px; width:140px" "/>
<input type="button" id="btnAddColumn" name="btnAddColumn" class="addcolumn add" value="OR" style="height:auto;"/>
</div>
</td>
</tr>
</table>
<div>
<input type="button" id="btnAddRow" name="btnAddRow" class="btnAddRow" value="AND" style="height:auto; "/>
</div>
</div>
提前致谢..
-DK
设置最大宽度和最大高度。
table {
max-width:600px;
max-height:600px;
overflow-y:scroll;
overflow-x:scroll;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.