8月5日
已被抛弃的框架frameset,必须放在body之外。
垂直和水平框架:
<frameset cols="30%,70%”>
或者是<frame rows="60%,40%">
//将整个页面分为两部分,链接的网址的页面各占,cols为列,rows为行。
<frame src="http://www.baidu.com"></frame>
<frame src="http://www.lol.qq.com"></frame>
</frameset>
混合一行二列框架:
<frameset rows="60%,40%">
<frame src="">
<frameset cols="30%,70%”>
<frame src="">
<frame src="">
</frameset>
</frameset>
标签<noframe>
<noframe>
<body>
当前浏览器不支持
</body>
</noframe>
导航框架:从一个框架链接到另一个框架
主结构:
<frameset cols="120,*">
<frame src="contents.html">
<frame src="a.html" name="showframe">
</frameset>
contents.html
<body>
<a href="a.html" target="showframe">Frame1</a>
<br>
<a href="b.html" target="showframe">Frame2</a>
</body>
a.html
<body bgcolor="aqua">
<h3>Frame1</h3>
</body>
b.html同上。
图:
在做的时候出现一个问题:当我content.html用<ul>时,google和IE浏览器都不能正确显示这个功能。
框架导航跳到指定的节,锚点上
主框架
<frameset rows="30%,70%">
<frame src="http://www.baidu.com">
<frameset cols="40%,60%" >
<frame src="main.html" >
<frame src="menu.html" name="main">
</frameset>
</frameset>
main.html
<a href="menu.html #one" target="main">第一章</a>
<a href="menu.html #two" target="main">第二章</a>
menu.html
<h2><a name="one">第一章 北灵院</a></h2>
<p>
一大段话
</p>
<h2><a name="two">第二章 北灵院记录卡上的</a></h2>
<p>
一大段话
</p>
图:
出现的问题:这个功能显示不能再chrome显示,只能在IE中显示。
在chrome中当点击时会下载文件。。。。。。。。
1、frame的属性
<frame frameborder="0/1是否显示边框"、noresize="noresize 无法调整框架的大小"
scrolling=“yes、no、auto滚动条是否显示”>
</frame>
2、iframe悬浮框架
<iframe src="图片或html文档或其他" height="" width="" frameborder=" 0/1框架边框" scrolling="yes/no/auto滚动条"
>
</iframe>
以上所用测试浏览器为IE9和chrome52.0.2743.82 m