【收集】iframe的使用(W3C原文)

博客主要介绍了HTML中iframe的使用语法,包含多种属性,如name、longdesc、src等。详细说明了各属性的含义、取值及作用,像scrolling属性有auto、yes、no三种取值,frameborder有1和0两种取值,还提及了部分属性的默认值情况。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Html
——iframe使用语法
<!ELEMENT IFRAME - - (%flow;)* -- inline subwindow -->
<!ATTLIST IFRAME
%coreattrs; -- id, class, style, title --
Longdesc %URI; #IMPLIED -- link to long description
(complements title) --
Name CDATA #IMPLIED -- name of frame for targetting --
Src %URI; #IMPLIED -- source of frame content --
Frameborder (1|0) 1 -- request frame borders? --
Marginwidth %Pixels; #IMPLIED -- margin widths in pixels --
Marginheight %Pixels; #IMPLIED -- margin height in pixels --
Scrolling (yes |no | auto) auto -- scrollbar or none --
Align %IAlign; #IMPLIED -- vertical or horizontal alignment --
Height %Length; #IMPLIED -- frame height --
Width %Length; #IMPLIED -- frame width --
>
Attribute definitions

Name = cdata [CI]
This attribute assigns a name to the current frame. This name may be used as the target of subsequent links.
longdesc = uri [CT]
This attribute specifies a link to a long description of the frame. This description should supplement the short description provided using the title attribute, and may be particularly useful for non-visual user agents.
src = uri [CT]
This attribute specifies the location of the initial contents to be contained in the frame.
noresize [CI]
When present, this boolean attribute tells the user agent that the frame window must not be resizeable.
scrolling = auto|yes|no [CI]
This attribute specifies scroll information for the frame window. Possible values
auto: This value tells the user agent to provide scrolling devices for the frame window when necessary. This is the default value.
yes: This value tells the user agent to always provide scrolling devices for the frame window.
no: This value tells the user agent not to provide scrolling devices for the frame window.
frameborder = 1|0 [CN]
This attribute provides the user agent with information about the frame border. Possible values:
1: This value tells the user agent to draw a separator between this frame and every adjoining frame. This is the default value.
0: This value tells the user agent not to draw a separator between this frame and every adjoining frame. Note that separators may be drawn next to this frame nonetheless if specified by other frames.
marginwidth = pixels [CN]
This attribute specifies the amount of space to be left between the frame's contents in its left and right margins. The value must be greater than zero (pixels). The default value depends on the user agent.
marginheight = pixels [CN]
This attribute specifies the amount of space to be left between the frame's contents in its top and bottom margins. The value must be greater than zero (pixels). The default value depends on the user agent.

Attributes defined elsewhere
id, class (document-wide identifiers)
title (element title)
style (inline style information)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值