gpt4 book ai didi

javascript - 嵌入响应在底部显示白色边框

转载 作者:太空宇宙 更新时间:2023-11-04 11:26:43 25 4
gpt4 key购买 nike

我有一个网页,它显示另一个使用 iframehtml 页面。请在下面查看我的代码。

<html>
<head>
<title>DotWifi</title>
<meta http-equiv="Pragma" content="no-cache">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
</head>

<body>
<div class="embed-responsive embed-responsive-4by3">
<iframe class="embed-responsive-item" src="http://www.xxxx.com/xxxxxx/xxpage?xxxId=123&tok=$tok&authaction=$authtarget"></iframe>
</div>
</body>
</html>

我尝试使用 embed-responsive-item 类使用 iframe 显示响应式网页。但它在底部显示一个白色边框。请看下图。

enter image description here

最佳答案

那不是边框,它只是主体的背景。

iframe 的父 div,embed-responsive-4by3 的宽高比应该是 4 x 3。这就是这个类所做的!因此,如果宽度为 416 像素(窗口的宽度),则高度变为 312 像素。
仅此而已。

如果您不想这样,解决方案是从 div 中删除 embed-responsive-4by3 类。

或者,如果您的页面所做的只是在 iframe 中显示另一个页面,您可以完全放弃 Bootstrap,只将 iframe 放在页面上!

关于javascript - 嵌入响应在底部显示白色边框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32324468/

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