如果我们使用 iframe,我们应该使用框架集文档类型吗?

发布于 2024-08-15 02:07:25 字数 90 浏览 2 评论 0原文

为什么 iframe 被声明为非标准元素?这很有用。

XHTML 1.1 中是否允许,或者如果我们使用 iframe,我们应该使用框架集文档类型吗?

Why are iframes declared as a non-standard elements? It is useful.

Is it allowed in XHTML 1.1, or should we use a frameset doctype if we use iframes?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

鸵鸟症 2024-08-22 02:07:25

iframe 是一种在网页框架内显示另一个 html 文档的方法。 w3 正在朝着使所有外部文件显示在使用标记完成的html 文档中的方向发展。这包括小程序、Flash 电影,甚至图像。 iframe 的弃用并不是因为在“框架”中显示 html 文件的想法不好,而是因为现在有一种“更好”的方法可以做同样的事情。

Iframe 在 XHTML 1.1 中被完全删除,因此它可能不会显示。 iframe 在支持它们的非框架集文档类型中有效,但更改文档类型有时会由于一些错误而改变其显示方式;互联网浏览器

由于许多浏览器对 iframe 和 标记的支持很粗略,因此最好仔细使用它们中的任何一个来测试代码,以确保其在主要浏览器中的行为。

请参阅替换xhtml 1.1 中带有对象的 iframe

An iframe is a method of displaying another html document inside a frame on a webpage. The w3 is moving towards making all external files to be displayed in an html document done with the <object> tag. This includes applets, flash movies, even images. Iframe's deprecation isn't because the idea of having an html file displayed in a "frame" is bad, it's deprecated because there's now a "better" method of doing the same thing.

Iframe is completely dropped in XHTML 1.1, so it will probably not display. Iframes are valid in the non frameset doctypes that support them, but changing the doctype can sometimes change how it's displayed due to some bugs <cough> internet explorer </cough>.

Since support for iframes and the <object> tag is sketchy in many browsers, its best to test code using either of them carefully to make sure if behaves in the major browsers.

see replacing iframe with object in xhtml 1.1

朱染 2024-08-22 02:07:25

因为它很丑陋,而且没有人希望他们的页面中有多组滚动条。

Because it's ugly and nobody wants multiple sets of scrollbars in their pages.

奈何桥上唱咆哮 2024-08-22 02:07:25

您可以使用对象。 (http://www.w3.org/TR /REC-html40/struct/objects.html#h-13.5

<object id="page" type="text/html" data="page.htm" width="500" height="600"> 
  <p>Oops! That didn't work...</p> 
</object>

You can use the object. (http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.5)

<object id="page" type="text/html" data="page.htm" width="500" height="600"> 
  <p>Oops! That didn't work...</p> 
</object>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文