1

我有一个 iframe,我想占据浏览器的整个宽度和高度:

<iframe src="http://example.com/index.html" width="100%" height="100%"></iframe>

不幸的是,它周围有 2 个像素的边距,导致顶部和左侧出现一条难看的细线,并出现滚动条。我试过这个没有运气:

<iframe src="http://example.com/index.html" width="100%" height="100%" style="margin:0;padding:0;"></iframe>
4

1 回答 1

3

也消除边界:

<iframe src="http://example.com/index.html" width="100%" height="100%" style="border:0;margin:0;padding:0;"></iframe>
于 2013-10-15T15:54:02.227 回答