[英]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.