JQuery自适应IFrame高度,支持嵌套--兼容IE,ff,safafi,chrome
转自:天芒
1 function adjustIFramesHeightOnLoad(iframe) {
2 var iframeHeight = Math.min(iframe.contentWindow.window.document.documentElement.scrollHeight, iframe.contentWindow.window.document.body.scrollHeight);
3 $(iframe).height(iframeHeight);
4 }
- 上一篇 »父容器内子容器浮动的高度自适应问题 _ CSS_HTML
- 下一篇 »css3让元素自适应高度