当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML <iframe>标签

HTML
HTML 介绍
HTML 元素
HTML 基本标签
HTML 格式
HTML 实体字符
HTML 链接
HTML 框架
HTML 表格
HTML 列表
HTML 表单
HTML 图片
HTML 背景
HTML 颜色
HTML 颜色值
HTML 颜色名
HTML 便条
HTML 布局
HTML 字体
HTML 4.0
HTML 样式

HTML <iframe>标签


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 603 ::
收藏到网摘: n/a

定义与用法

The iframe element creates an inline frame that contains another document.
iframe元素可以让内联的框架中包含另一个文档


在HTML和XHTML中的区别

NONE


实例

代码 输出结果
<iframe 
src ="/default.asp"
width="100%">
</iframe>


可选属性

DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
下表中的DTD列指明了被支持的DTD属性。S=Strict(精确的),T=Transitional(传统的),F=Frameset(框架)

属性 描述 DTD
align left
right
top
middle
bottom
Specifies how to align the iframe according to the surrounding text
指定iframe应该如何根据周围的文字进行对齐
TF
frameborder 1
0
Specifies whether or not to display a frame border
指定框架边框是否需要显示
TF
height pixels
%
Defines the height of the iframe
指定iframe的高度
TF
longdesc URL A URL to a long description of the frame contents
为框架内容的描述指定一个URL
TF
marginheight pixels Defines the top and bottom margins of the iframe
定义框架的上下边际
TF
marginwidth pixels Defines the left and right margins of the iframe
定义iframe的左右边际
TF
name frame_name Specifies a unique name of the iframe (to use in scripts)
定义iframe唯一的name值(可用于脚本)
TF
scrolling yes
no
auto
Define scroll bars
定义滚动条
TF
src URL The URL of the document to show in the iframe
定义iframe所要展示的URL
TF
width pixels
%
Defines the width of the iframe
定义iframe的宽度
TF

标准属性

id, class, title, style

For a full description, go to Standard Attributes.
查看完整的属性


尝试与演示

Inline frame
How to create an inline frame (a frame inside an HTML page).
怎样建立一内联框架(框架内包含一张HTML页面)

评论 (0) All

登陆 | 还没注册?