当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML 框架

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

HTML 框架


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

With frames, you can display more than one Web page in the same browser window.
使用多个框架你可以在同一窗口下显示多个WEB页面。


Examples
实例

Vertical frameset
垂直的框架
This example demonstrates how to make a vertical frameset with three different documents.
演示如何去建立一个垂直框架并包含三个不同的文档。

Horizontal frameset
水平框架
This example demonstrates how to make a horizontal frameset with three different documents.
演示如何建立包含三个不同文档的框架。

(You can find more examples at the bottom of this page)
你可以在下面找到更多的实例


Frames
框架

With frames, you can display more than one HTML document in the same browser window. Each HTML document is called a frame, and each frame is independent of the others.
使用多框架你可以在同一窗口下显示多个WEB页面。每个HTML文档叫做一个框架,每个框架都是相对独立的。

The disadvantages of using frames are:
使用框架的缺点:

  • The web developer must keep track of more HTML documents
    WEB开发者必须明确更多HTML文档。
  • It is difficult to print the entire page
    要打印整个页面就十分的麻烦。

The Frameset Tag
Frameset标签

  • The <frameset> tag defines how to divide the window into frames
    <frameset>标签用来定义怎么去划分框架
  • Each frameset defines a set of rows or columns
    每个frameset定义行集或是列集。
  • The values of the rows/columns indicate the amount of screen area each row/column will occupy
    里面的值用来确定排/列在显示区域里的范围。

The Frame Tag
Frame标签

  • The <frame> tag defines what HTML document to put into each frame
    <frame>标签定义了在每个框架里显示什么HTML文档。

In the example below we have a frameset with two columns. The first column is set to 25% of the width of the browser window. The second column is set to 75% of the width of the browser window. The HTML document "frame_a.htm" is put into the first column, and the HTML document "frame_b.htm" is put into the second column:
在下面这个例子中我们有一个双列的框架集。第一个列被设置为在本页窗口占据25%宽度。第二个为75%的宽度。"frame_a.htm"显示在第一个列,"frame_b.htm"在第二个。

<frameset cols="25%,75%">
<frame src="frame_a.htm">
<frame src="frame_b.htm">
</frameset>

Basic Notes - Useful Tips提示

If a frame has visible borders, the user can resize it by dragging the border. To prevent a user from doing this, you can add noresize="noresize" to the <frame> tag.
如果框架的边框能够显示,那浏览者就能够拖拉边框改变框架的范围大小,如果你不希望用户自定义框架大小,那么可以在<frame>标签里添加noresize="noresize"。

Add the <noframes> tag for browsers that do not support frames.
为了那些不支持的浏览器就得添加<noframes>标签。

Important:
You cannot use the <body></body> tags together with the <frameset></frameset> tags! However, if you add a <noframes> tag containing some text for browsers that do not support frames, you will have to enclose the text in <body></body> tags! See how it is done in the first example below.
重点提示:你不能同时使用<frameset></frameset>和<body></body>标签;如果你需要在<noframe>标签中添加一个说明内容(仅当浏览器不支持框架时,会显示该内容),那你必须将这段文本写在<body></body>标签内。见下面的案例1:


More Examples
更多实例

How to use the <noframes> tag
怎样去使用<noframes>标签
This example demonstrates how to use the <noframes> tag.
这个例子演示怎么样去使用<noframes>标签的。

Mixed frameset
混合的框架
This example demonstrates how to make a frameset with three documents, and how to mix them in rows and columns.
演示怎样做个框架能够让三个文档混合在几个行和列中。

Frameset with noresize="noresize"
使用了noresize="noresize"的框架
This example demonstrates the noresize attribute. The frames are not resizable. Move the mouse over the borders between the frames and notice that you can not move the borders.
演示了noresize属性。框架就不能改变大小了。点住边框并移动鼠标你会发现你不能改变框架大小。

Navigation frame
导航框架
This example demonstrates how to make a navigation frame. The navigation frame contains a list of links with the second frame as the target. The file called "tryhtml_contents.htm" contains three links. The source code of the links:
这个例子演示了怎么去做一个导航框架。导航框架包含了连接列表并指向第二个框架。叫做"tryhtml_contents.htm"的文件包含了三个连接。连接源代码如下:

<a href ="frame_a.htm" target ="showframe">Frame a</a><br>
<a href ="frame_b.htm" target ="showframe">Frame b</a><br>
<a href ="frame_c.htm" target ="showframe">Frame c</a>


The second frame will show the linked document.
第二个框架就会显示所连接的内容。

Inline frame
轴向框架
This example demonstrates how to create an inline frame (a frame inside an HTML page).
演示怎样去建立一个IFRAME(框架被包含在一个HTML页面中)

Jump to a specified section within a frame
在一个框架中跳转到一个位置
This example demonstrates two frames. One of the frames has a source to a specified section in a file. The specified section is made with <a name="C10"> in the "link.htm" file.
这个例子演示了两个框架,其中的一个其内容来源是一个文件的特殊位置,是通过在 "link.htm"文件中使用<a name="C10">实现的。.

Jump to a specified section with frame navigation
用导航框架跳转到一个位置
This example demonstrates two frames. The navigation frame (content.htm) to the left contains a list of links with the second frame (link.htm) as a target. The second frame shows the linked document. One of the links in the navigation frame is linked to a specified section in the target file. The HTML code in the file "content.htm" looks like this: <a href ="link.htm" target ="showframe">Link without Anchor</a><br><a href ="link.htm#C10" target ="showframe">Link with Anchor</a>.
这个案例演示了两个框架。navigation框架(content.htm)位于左边,它包含了一组连接列表(link.htm),以第二个框架为连接目标。第二个框架展示了连接的文档内容。导航框架中的连接是用于连接到目标文件的指定部分的。在“content.htm”文件中的HTML代码就如同:<a href ="link.htm" target ="showframe"><br>a href ="link.htm#C10" target ="showframe">(注意:这两个连接都不含</a>锚)(简单演示了一个左册目录导航)


Frame Tags
框架标签介绍

Tag
标签
Description
描述
<frameset> Defines a set of frames
定义了一框架集
<frame> Defines a sub window (a frame)
子窗口(框架)
<noframes> Defines a noframe section for browsers that do not handle frames
无框架处理
<iframe> Defines an inline sub window (frame)
定义子窗口(框架)

评论 (0) All

登陆 | 还没注册?