gpt4 book ai didi

html - 为什么此 iframe 大小未调整为 100%?

转载 作者:行者123 更新时间:2023-11-28 00:14:37 25 4
gpt4 key购买 nike

给定包含 iframe 的以下页面

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" media="screen" href="/public/stylesheets/main.css">
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body style="min-height: 100; margin: 0px">
<iframe src="testpage.html" frameborder="0" style="overflow:hidden;height:100%;width:100%" height="100%" width="100%">
</body>
</html>

启动时,iframe 似乎只会加载 testpage.html 中的部分文本。如何让 iframe 显示 testpage.html 的全部内容?

最佳答案

htmlbody 高度也设置为 100%。

html, body { height: 100%; }

您可能(也可能不需要)将 iframe 上的 display 设置为阻止:

iframe { display:block; }

关于html - 为什么此 iframe 大小未调整为 100%?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12963424/

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