html--frameset、frame

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





评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值