码迷,mamicode.com
首页 > 其他好文 > 详细

iframe frameset frame noframes的简单介绍

时间:2014-08-14 13:57:38      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   使用   ar   div   代码   

iframe       内联框架

  注意:一些老的浏览器是不支持iframe的,不支持的话就不会显示

  常用属性:

    src    框架中载入页面的链接地址

    scrolling     yes/no/auto   是否在iframe中显示滚动条

    name    定义iframe的名字,可以与超链接a结合使用。此时a中的target属性值和iframe中的name属性值相同。

    

<ul>
        <li><a href="http://www.baidu.com" target="a">百度</a></li>
        <li><a href="http://www.cnblogs.com" target="a">博客园</a></li>
        <li><a href="http://www.w3school.com.cn" target="a">W3C</a></li>
    </ul>
    <iframe src="http://www.sina.com" name="a" style="height:500px;width:1000px;" scrolling="auto"></iframe>

frameset     框架集

  常用属性:

    cols="20%,40%,*"   rows="20%,40%,*"

frame        定义frameset中的一个特定窗口(框架)

  常见属性:

    src  当前窗口载入页面的链接地址  

    scrolling   yes/no/auto  当前窗口是否滚动  

    noresize="noresize"    当前窗口不允许调整大小

    name   frame名字   同iframe一样这个名字的值也可以和超链接a中target的值一样,将该框架作为超链接的载入窗口

noframes      当浏览器不支持框架frameset的时候,frame的内容不再显示,可以用noframes包含body提示用户

    代码如下:

      

 1 <html>
 2 <frameset cols="25%,50%,25%">
 3   <frame src="/example/html/frame_a.html">
 4   <frame src="/example/html/frame_b.html">
 5   <frame src="/example/html/frame_c.html">
 6 <noframes>
 7 <body>您的浏览器无法处理框架!</body>
 8 </noframes>
 9 </frameset>
10 </html>

区别与联系:

   iframe是内联框架,可以写在body当中;

   frameset是将整个浏览器窗口分成多个,显示各自frame的链接地址

   frame和noframes都是在frameset中包含着的

      

    

    

iframe frameset frame noframes的简单介绍,布布扣,bubuko.com

iframe frameset frame noframes的简单介绍

标签:style   blog   http   color   使用   ar   div   代码   

原文地址:http://www.cnblogs.com/bjchenxn/p/3912256.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!