如果我们使用 iframe,我们应该使用框架集文档类型吗?
为什么 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
iframe 是一种在网页框架内显示另一个 html 文档的方法。 w3 正在朝着使所有外部文件显示在使用
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
因为它很丑陋,而且没有人希望他们的页面中有多组滚动条。
Because it's ugly and nobody wants multiple sets of scrollbars in their pages.
您可以使用
对象
。 (http://www.w3.org/TR /REC-html40/struct/objects.html#h-13.5)You can use the
object
. (http://www.w3.org/TR/REC-html40/struct/objects.html#h-13.5)