HTML框架

来源:互联网 发布:安庆网络电视台 编辑:程序博客网 时间:2024/06/12 00:33

frameset

可以将页面划分为几个不同的区域,用以显示不同的页面,与frame混合使用,类似于select与option的关系。
属性:
1,cols 列数。一组用逗号分开的数值(可以用百分比数值,也可以用具体像素值),指定各子窗口的高度
2,rows 行数。一组用逗号分开的数值(可以用百分比数值,也可以用具体像素值),指定各子窗口的宽度
3,noresize 固定框架大小。不可移动

有框架的页面不可与body共同使用

    <frameset cols="30%,30%,*">        <frame src = "http://baidu.com"></frame>        <frame src = "http://www.sohu.com/"></frame>        <frame src = "http://www.qq.com/"></frame>    </frameset>


这里写图片描述

一种导航窗格的效果

        <frameset rows="30%,*">            <frame src="frame/frame.html"></frame>            <frameset cols="30%,*">                <frame src="frame/left.html"></frame>                <frame src="" name="right"></frame>            </frameset>        </frameset>

这里写图片描述

在链接的target属性中可以写上指定框架的name,这样这个链接打开的页面会显示在指定的框架中

<html>    <body>    <center>        <a href="http://www.baidu.com" target="right">百度</a><br/>        <a href="http://www.sohu.com/" target="right">搜狐</a><br/>        <a href="http://www.qq.com" target="right">腾讯</a><br/>    </center>    </body></html>
0 0