自动将框架的高度调整为窗口大小

时间:2019-03-10 19:15:16

标签: html

html中,有没有一种方法可以调整frame的大小以根据browser窗口的大小而变化?

例如,注意height=667。是否有语义要说:当用户将窗口调整为窗口大小时,调整框架大小。

<iframe src="https://sslecal2.forexprostools.com?columns=exc_flags,exc_currency,exc_importance,exc_actual,exc_forecast,exc_previous&features=datepicker,timezone&countries=25,32,6,37,72,22,17,39,14,10,35,43,56,36,110,11,26,12,4,5&calType=week&timeZone=8&lang=1" width="650" height="667" .....

1 个答案:

答案 0 :(得分:2)

<body style="margin:0px;padding:0px;overflow:hidden">
    <iframe src="http://www.youraddress.com" frameborder="0" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;height:100%;width:100%;position:absolute;top:0px;left:0px;right:0px;bottom:0px" height="100%" width="100%"></iframe>
</body>

这是一种选择。希望对您有帮助!