【问题标题】:embed-responsive shows white border in bottomembed-responsive 在底部显示白色边框
【发布时间】:2015-09-01 05:56:28
【问题描述】:

我有一个网页,它显示了另一个使用 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>

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

【问题讨论】:

    标签: javascript html css twitter-bootstrap iframe


    【解决方案1】:

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

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

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-08-13
      • 2021-02-07
      • 2020-05-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多