星空网 > 软件开发 > 网页设计

iframe用法

<iframe src='/images/loading.gif' data-original="http://caiyanli.top/" height="500"  width="500" frameborder="0"

 marginheight="2" marginwidth="0" scrolling="yes"></iframe>

注:iframe h5 新增标签,元素会创建包含另外一个文档的内联框架(即行内框架)。

您可以把需要的文本放置在 <iframe> 和 </iframe> 之间,这样就可以应对无法理解 iframe 的浏览器。

iframe属性和值和作用

 

属性

作用

frameborder

  • 1
  • 0

规定是否显示框架周围的边框。

height

  • pixels
  • %

规定 iframe 的高度。

longdesc

URL

规定一个页面,该页面包含了有关 iframe 的较长描述。

marginheight

pixels

定义 iframe 的顶部和底部的边距。

marginwidth

pixels

定义 iframe 的左侧和右侧的边距。

name

frame_name

规定 iframe 的名称。

sandbox

  • ""
  • allow-forms
  • allow-same-origin
  • allow-scripts
  • allow-top-navigation

启用一系列对 <iframe> 中内容的额外限制。

scrolling

  • yes
  • no
  • auto

规定是否在 iframe 中显示滚动条。

seamless

seamless

规定 <iframe> 看上去像是包含文档的一部分。

src

URL

规定在 iframe 中显示的文档的 URL。

srcdoc

HTML_code

规定在 <iframe> 中显示的页面的 HTML 内容。

width

  • pixels
  • %

定义 iframe 的宽度。

 

代码:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>我的网页</title>
</head>
<body bgcolor="#ff9900">
<h1>我的网页</h1>
<hr>
<iframe src='/images/loading.gif' data-original="http://caiyanli.top/" height="500" frameborder="0" marginheight="2" marginwidth="0" scrolling="yes">看不到我</iframe>
</body>
</html>

 




原标题:iframe用法

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

337调查(337 Investigations):https://www.ikjzd.com/w/4495
Flipkart(印度电商平台):https://www.ikjzd.com/w/4496
outofstock:https://www.ikjzd.com/w/4497
mountaintea:https://www.ikjzd.com/w/4498
maogepingbeauty:https://www.ikjzd.com/w/4499
搜索整合工具Soolve:https://www.ikjzd.com/w/450
川藏线自驾游要怎么走才比较划算呢?:https://www.vstour.cn/a/411240.html
去日本入住酒店,东西随意用却有一个特殊“要:https://www.vstour.cn/a/411241.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流