全网整合营销服务商

电脑端+手机端+微信端=数据同步管理

免费咨询热线:15165206905

第十九节:HTML 框架 教程HTML 框架

1、垂直框架
例如:
<frameset cols="25%,50%,25%">
 
  <frame src="/frame_a.html">
  <frame src="/frame_b.html">
  <frame src="/frame_c.html">
 
</frameset>

2、水平框架
rows

3、混合
<frameset rows="50%,50%">
 
<frame src="/example/html/frame_a.html">
 
<frameset cols="25%,75%">
<frame src="/example/html/frame_b.html">
<frame src="/example/html/frame_c.html">
</frameset>
 
</frameset>

4、导航
 在浏览网页时,我们经常会看到一个导航条,当点击导航条上的项目时,相应网页会在显示区域变换显示。首先准备一个主界面文件main.htm,将其划分成两块区域index和content.
<html>
<frameset cols="120,*">
<frame name="index" src="index.htm" />
<frame name="content" src="frame_a.htm" />
</frameset>
</html>
    其中index区域链接index.htm文件,主要是一些链接项目;content区域负责显示相应链接文件,初始显示链接为frame_a.htm. name="index"是标明index区域的属性,name="content"是标明content区域的属性。
    那么如何将index.htm中的链接输出到content区域显示呢?这里需要设置链接中的target属性。代码如下:
<html>
<head>
</head>
<body>
 <a href="frame_a.htm" target="content">frame_a</a>
 <a href="frame_b.htm" target="content">frame_b</a>
 <a href="frame_c.htm" target="content">frame_c</a>
</body>
</html>
 

上一篇:第十八节:HTML表单小练习
下一篇:没有了

您的项目需求

*请认真填写需求信息,我们会在24小时内与您取得联系。