【问题标题】:How do I remove the white border between my header image and iframe?如何删除标题图像和 iframe 之间的白色边框?
【发布时间】:2013-01-21 23:44:12
【问题描述】:

我希望有一个单页网站,其顶部的标题图像随浏览器页面的宽度而扩展,而其下方的 iframe 则显示另一个网站。我主要完成了这一点(感谢stackoverlow的代码),但问题是在我的iframe出现之前,我的标题图像下方有一个空白。知道如何删除此内容或对其他方式来完成我的网页的想法吗?这是我到目前为止的代码。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<style>
*{margin:0;padding:0}
html, body {height:100%;width:100%;overflow:hidden}
table {height:100%;width:100%;table-layout:static;border-collapse:collapse}
iframe {height:100%;width:100%}

.header {border-bottom:1px solid #000}
.content {height:100%}
</style>
</head>
<body>
<table>
  <tr><td class="header"><div><h1>Header</h1></div></td></tr>
  <tr><td class="content">
    <iframe src="http://google.com/" frameborder="0"></td></tr>
</table>
</body>
</html>

【问题讨论】:

    标签: iframe header space


    【解决方案1】:

    你可以试试 边框:无;

    border: 0;
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-08-24
      • 2023-03-26
      • 2014-05-21
      • 1970-01-01
      • 2018-10-28
      • 1970-01-01
      • 2021-11-05
      • 2017-10-28
      相关资源
      最近更新 更多