HTML <frame>标签用于指定框架集标签中的每个框架。HTML5不支持此标签。
<!DOCTYPE html> <html> <head> <title>HTML frame Tag</title> </head> <frameset cols="200, *"> <frame src="/html/menu.htm" name="menu_page" /> <frame src="/html/main.htm" name="main_page" /> <noframes> <body> Your browser does not support frames. </body> </noframes> </frameset> </html>
这将产生以下结果,请参考下面的图像。左框架是menu.htm,右框架是main.htm-
链接:https://www.learnfk.comhttps://www.learnfk.com/html/html-frame-tag.html
来源:LearnFk无涯教程网
HTML <frame>标签还支持以下附加属性-
Attribute | Value | 描述 |
---|---|---|
frameborder | 0 or 1 | 指定是否在边框周围显示边框。 |
marginheight | pixels | 允许您指定框架边框的左侧和右侧与框架内容之间的间隔宽度。该值以像素为单位。例如,marginwidth =“ 10”。 |
marginwidth | pixels | 指定框架内容与左右边界之间的边界(以像素为单位)。 |
name | frame name | 框架名称。 |
noresize | noresize | 设置为noresize时,用户无法调整框架的大小。 |
scrolling | yes no auto |
确定滚动条动作。 |
src | URL | 框架内容文件的位置。 |
Chrome | Firefox | IE | Opera | Safari | Android |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)