框架在HTML5中不推荐使用,但不使用iFrame [英] Frames deprecated in HTML5 but not iFrames

查看:2201
本文介绍了框架在HTML5中不推荐使用,但不使用iFrame的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么它在HTML5中被弃用,而不是iFrame。毕竟,两者几乎没有区别。在很多情况下,使用它们中的任何一个都会得到相同的输出(如果我错了,请原谅我)?使用内联框架

使用内联框架将插件嵌入页面的某些部分。之前在网站上看过谷歌地图?这些是iframes。



另一方面,实际的帧非常没有意义。它们几乎从未在专业网站中使用过。如果你去过高中,你可能会看到IT项目使用框架作为导航栏或其他东西。它们占用页面的一半(或者你配置它),并作为单独的页面加载。



简单地说:iframe可以用作插件。框架不够优雅并且不是很有用

编辑:
更具体地说,iframe和框架是完全不同的。
使用我的谷歌地图示例,iframe会在页面上显示一个小框,就像您习惯的那样。一个普通的框架会显示一半的屏幕(你可以设置多个框架,这样一个特定的框架在屏幕中间,但为什么当你可以使用内联框架?)

Why is it Frames were deprecated in HTML5 but not iFrames. After all, there is almost no difference between the two. In many instances using either of them would give the same output (pardon me if I am Wrong)?

解决方案

Inline frames are used to embed "plugins" into parts of a page. Seen google maps on a website before? Those are iframes.

Actual frames on the other hand are quite pointless. They're virtually never used in professional websites. If you ever go to a high school you may see IT projects that use frames for "navigation bars" or something. They take up half the page (or however you configure it) and are loaded as a separate page.

Simply put: iframes can be used as plugins. Frames are inelegant and not very useful

Edit: To be more specific, iframes and frames are quite different. Using my google maps example, and iframe would should a little box on the page as you're use to it. A plain frame would take half the screen to display (you can set up many frames so that a particular frame is in the middle of the screen, but why do that when you can use an inline frame?)

这篇关于框架在HTML5中不推荐使用,但不使用iFrame的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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