0

我正在尝试使用 iframe 在我的网页中嵌入一个 URL。该页面在 FireFox 和 Chrome 上正常工作,但在 IE 上,滚动条后留下一个垂直空间,我该如何删除它?

这是与CSS一起的代码,

<html>
<head>
<style type="text/css">
html, body {
    margin: 0;
    padding 0;
}
iframe {
    height: 100%;
    width: 100%;
}
h1 {
    text-align: center;
}
</style>
</head>
<body>

<iframe src="http://abc.org" frameborder="0" scrolling="auto" ></iframe>

</body>
</html>

问候,蒂莫西

4

1 回答 1

0

这是您的完整解决方案:

<head>
<style type="text/css">
html {height:100%}
body {
margin:0;
height:100%;
overflow:hidden
}
</style>
</head>

<body>
<iframe allowtransparency=true frameborder=0 id=rf sandbox="allow-same-origin allow-forms allow-scripts" scrolling=auto src="http://www.abc.org" style="width:100%;height:100%"></iframe>
</body>
于 2012-12-19T06:05:47.383 回答