如何在Firefox中动态调整iFrame的大小? [英] How to dynamically resize iFrame in Firefox?
问题描述
我使用了这个页面上的解决方案来根据内容调整iFrame的大小:
>根据内容调整iframe的大小 b
$ b
除了Firefox以外,在Firefox中,其他内容会被截断,但一旦您继续刷新页面,浏览器将慢慢地显示其余内容。我看到有人回答说这是问题的解决方案:
lockquote
使用jQuery获取
的body高度framed.html (FF问题,body b $ b增长):var height =
$(document.body).height();
但是,我不知道把那行代码放在哪里。是否将其插入原始解决方案的3个脚本片段中的某个位置?如果是的话,我把它放在哪里?
我已经解决了。如果其他人可能遇到同样的问题,我使用下面的网页上的代码,与上面给出的链接略有不同:
http://solidgone.org/Set-IFRAME-height-based大小远程加载的内容
I used the solution stated on this page to resize the iFrame depending on the content:
Resizing an iframe based on content
And it works perfectly, except in Firefox. In Firefox, the other content is cut-off but once you keep on refreshing the page, the browser will slowly reveal the rest of the content. I saw someone replied that this is the solution to the problem:
Use jQuery to get the body height in framed.html (FF issue, body kept growing): var height = $(document.body).height();
However, I don't know where to put that line of code. Do I insert it somewhere within the 3 snippets of scripts on the original solution? If so, where do I put it?
I already solved it. In case somebody else might be encountering the same problem, I used the code on the web page below which is slightly different from the link I gave above:
http://solidgone.org/Set-IFRAME-height-based-on-size-of-remotely-loaded-content
这篇关于如何在Firefox中动态调整iFrame的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!