您好!感谢您的提问。
jQuery UI对话框中的iFrame会导致父级的水平滚动条。这个问题可能是由于iFrame的宽度和高度设置不正确导致的。为了解决这个问题,您可以尝试以下方法:
iframe {
width: 100%;
height: 100%;
}
function resizeIframe() {
var iframe = document.getElementById('my-iframe');
iframe.style.height = iframe.contentWindow.document.documentElement.scrollHeight + 'px';
iframe.style.width = iframe.contentWindow.document.documentElement.scrollWidth + 'px';
}
function resizeIframe() {
var iframe = $('#my-iframe');
iframe.height(iframe.contents().height());
iframe.width(iframe.contents().width());
}
iframe {
min-width: 100%;
min-height: 100%;
}
希望这些方法能够帮助您解决问题。如果您有其他问题,请随时提问。
领取专属 10元无门槛券
手把手带您无忧上云