这是我的模式div元素:
<div id="modal-window" style="display:none;">
<iframe id="modal-window-inner-html" frameborder="0"></iframe>
</div>这是我在javascript中定义的jquery模式:
$("#modal-window").dialog({
autoOpen: false,
modal: true,
width: 350,
height: 800
});这是iframe css:
#modal-window iframe {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
}在iframe内容中,我通常会放入较大的html,以便滚动。我有一个chrome问题(其他浏览器工作正常),当我第一次在chrome中打开模式时一切都很好(滚动是可见的),但当我关闭模式并再次打开第二次,第三次等等,滚动是不可见的,但我仍然可以滚动内容。如何强制此滚动条可见?我试着把overflow-y: auto !important;放在iframe上,把maxHeight放在jquery modal上,在close上销毁jquery modal,但是都没有解决这个问题。
发布于 2016-08-29 16:37:36
向iFrame添加一个固定的像素高度应该可以解决这个问题
https://stackoverflow.com/questions/39201489
复制相似问题