documentElement Scroll iframe resizer 使用上次调整后的高度
documentElementScroll iframe resizer uses height from previous resize
我使用 davidjbradshaw/iframe-resizer 调整 iframe 的大小,使用 CORS 一切正常,但我遇到了一个问题,当我从全屏调整 window 的大小时,iframe 的高度得到不同的内容高度,这没问题,但是当我 return 回到全屏 "heightCalculationMethod: 'documentElementScroll'" 时,文档内容 scrollheight 使用先前 window 的高度,内容具有更大的高度并创建一个 space,即 space 是 iframe 的一部分,例如。 iframe 高度是 900px,但是 iframe 内容高度是 800px,反应灵敏,正是我想要的!
提前致谢!
$('iframe').iFrameResize({
autoResize: true,
checkOrigin: false,
heightCalculationMethod: 'documentElementScroll',
sizeHeight: true,
log: true
});
将 iframe 内容的主体高度从 100% 更改为自动并修复了它。
我使用 davidjbradshaw/iframe-resizer 调整 iframe 的大小,使用 CORS 一切正常,但我遇到了一个问题,当我从全屏调整 window 的大小时,iframe 的高度得到不同的内容高度,这没问题,但是当我 return 回到全屏 "heightCalculationMethod: 'documentElementScroll'" 时,文档内容 scrollheight 使用先前 window 的高度,内容具有更大的高度并创建一个 space,即 space 是 iframe 的一部分,例如。 iframe 高度是 900px,但是 iframe 内容高度是 800px,反应灵敏,正是我想要的!
提前致谢!
$('iframe').iFrameResize({
autoResize: true,
checkOrigin: false,
heightCalculationMethod: 'documentElementScroll',
sizeHeight: true,
log: true
});
将 iframe 内容的主体高度从 100% 更改为自动并修复了它。