iframe中的动态高度

时间:2013-09-12 11:45:13

标签: html iframe dynamic height

我有这个网站:http://thc-racing.ucoz.com/index/forum/0-14 可以看出,在iframed论坛下有一个巨大的空间,我做了它,所以我可以在导航时尽可能多地显示但是,有什么办法可以在每个页面加载后调整高度吗?

代码:

<iframe 
style="-moz-border-radius:10px; 
       -webkit-border-radius:10px; 
       border-radius:10px" 
height="4800" width="900" 
frameborder="0" src="http://thc-racing.forumotion.co.uk/"></iframe>

我可以在论坛上访问CSS和Scripts。 感谢

1 个答案:

答案 0 :(得分:0)

Adjust width height of iframe to fit with content in it处有一个类似的问题,您可以使用提供的代码并修改它以使用您自己的常量值调整宽度和高度,而不是像接受的答案中提供的代码那样自动调整。