gpt4 book ai didi

javascript - 不允许我调整 IFrame 窗口的大小

转载 作者:行者123 更新时间:2023-11-28 19:35:49 27 4
gpt4 key购买 nike

使用 asp.net mvc 2 创建 Web 应用程序。

尝试在索引页面内添加 iframe。

<div id="root">
<iframe src='http://restOfUrl' width='100%' height='100%'></iframe>
</div>

Iframe 在宽度的 100% 内加载页面,但仅在高度的 20% 左右。尝试添加多个 <br/>上面和下面的 iframe 标记,看看是否有任何区别。页面的高度已扩大,但 iframe 保持不变。

请指教?干杯

最佳答案

只需为您的案例中的父元素提供 80% 或 100% 的高度

root{
height:80%
}

http://jsfiddle.net/9akc2jpy/ 1

关于javascript - 不允许我调整 IFrame 窗口的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25910428/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com