gpt4 book ai didi

javascript - Jquery 对话框 chrome 问题 - 第二次打开时滚动不可见

转载 作者:行者123 更新时间:2023-11-28 16:06:08 26 4
gpt4 key购买 nike

这是我的模态 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 上,在关闭时破坏 jquery modal,但没有解决问题。

最佳答案

向 iFrame 添加固定像素高度应该可以解决这个问题

关于javascript - Jquery 对话框 chrome 问题 - 第二次打开时滚动不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39201489/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com