如何在HTML中使用iframe? [英] How are iframes used in html?

查看:168
本文介绍了如何在HTML中使用iframe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是iframe,它是如何用于html的?

What is an iframe, and how is it used in html?

推荐答案

iframe是一个对象,允许您将外部内容嵌入到HTML页面中。您可以使用它来显示其他网页,文档(例如PDF)等(尽管对于复杂的媒体类型,您可能需要尝试使用对象标记)。

An iframe is an object that allows you to embed external content in your HTML page. You can use it to display other web pages, documents (e.g. PDF) etc (although for complex media types you may want to try the object tag instead).

您可以像这样添加一个iframe到你的页面:

You can add an iframe to your page like so:

<iframe src ="externalContent.html" width="400" height="300">
  <p>Your browser does not support iframes.</p>
</iframe>

如果所使用的浏览器不支持iframe,将会显示内部的p标签。

The p tag inside will display if iframes are not supported by the browser being used.

这篇关于如何在HTML中使用iframe?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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