![](/img/trans.png)
[英]Why is it that when I move my text down another vertical scroll bar appears on the inside of the browser?
[英]Vertical scroll bar appears only when I push resize corner in the dialog jQuery
我有一个max-height = 400px的对话框,当内容高度超过400px时,没有出现垂直滚动条的问题,但是当我按下对话框的调整大小角并关闭它,然后重新打开它时垂直滚动条出现并且工作正常。 有什么建议或想法如何解决这个问题? 这是ui-dialog和ui-dialog-content:
.ui-dialog {
max-height: 400px;
overflow: hidden;
padding: 0.2em;
position: absolute;
width: 300px;
}
.ui-dialog .ui-dialog-content {
background: none repeat scroll 0 0 transparent;
border: 0 none;
overflow: auto;
padding: 0.5em 1em;
position: relative;
}
这是我使用此对话框的代码:
<script type="text/javascript">
function formatViewLink(cellvalue, options, rowObject) {
return "<a onClick='openDialog("+cellvalue+")'>" + '<img src="images/view_detail.png" />' + "</a>";
}
</script>
<script type="text/javascript">
function openDialog(isobolId) {
$("#selected_structs").load("${viewUrl}?isobolId="+isobolId);
$("#selected_structs").dialog('open');
}
</script>
<@sj.dialog
id="selected_structs"
title="Version Structures"
autoOpen="false"
modal="true"
width="400"
height="auto"
position="['center','top']"
>
</@sj.dialog>
我通过更改struts2jquery-plugin-3.3.1.jar
的jquery-ui.css
文件解决了该问题。 在第435行中, overfolw:hidden
overflow:auto
。 然后我清空浏览器的缓存,它的工作方式就像是魅力:-)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.