“全屏"<iframe> [英] "Full screen" <iframe>

查看:31
本文介绍了“全屏"<iframe>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用以下代码创建 iframe 时:

When I use the following code to create an iframe:

<iframe src="mypage.html" style="border: 0; width: 100%; height: 100%">Your browser doesn't support iFrames.</iframe>

iframe 并没有完全走完——一个 10 像素的白色边框"围绕着 iframe.我该如何解决这个问题?

The iframe doesn't go all the way—a 10px white "border" surrounds the iframe. How could I solve this?

这是问题的图像:

推荐答案

body 在大多数浏览器中都有默认的边距.试试:

The body has a default margin in most browsers. Try:

body {
    margin: 0;
}

在带有 iframe 的页面中.

这篇关于“全屏"&lt;iframe&gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆