固定 Iframe 高度以百分比获取内容全高
fix Iframe height in Percentage to aquire contents full height
我已经实现了这样的 iframe
<iframe name="Container" width="100%" height="900px" frameborder="0"></iframe>
我在这里使用像素固定高度,这会在我更改屏幕分辨率时产生问题。由于将在 iframe 中显示的内容每次都不同(目标用于不同的 html 以在 iframe 中显示)因此我想修复 Percentage.So 中的框架高度,以便它可以在没有滚动条的情况下显示整个内容.
谢谢
<iframe name="Container" width="100%" height="100%" frameborder="0"></iframe>
试试这个代码。您可以将高度设置为 100%。为了解决问题
我已经实现了这样的 iframe
<iframe name="Container" width="100%" height="900px" frameborder="0"></iframe>
我在这里使用像素固定高度,这会在我更改屏幕分辨率时产生问题。由于将在 iframe 中显示的内容每次都不同(目标用于不同的 html 以在 iframe 中显示)因此我想修复 Percentage.So 中的框架高度,以便它可以在没有滚动条的情况下显示整个内容. 谢谢
<iframe name="Container" width="100%" height="100%" frameborder="0"></iframe>
试试这个代码。您可以将高度设置为 100%。为了解决问题