Home > Web Front-end > H5 Tutorial > 深入剖析HTML5 内联框架iFrame_html5教程技巧

深入剖析HTML5 内联框架iFrame_html5教程技巧

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-30 17:07:00
Original
1477 people have browsed it

由于现在frame和frameset很少使用,已经过时了,已经被div+CSS代替了,所以,这里只是举例说明一下,当下还在使用的内联框架iFrame

所谓的iFrame内联框架,我的理解就是在网页内部嵌套一个网页,并且可以一级一级地嵌套下去。

示例如下:

/*

示例由index.html和iframe1.html、iframe2.html、iframe3.html组成

*/

先上一张效果图,图片后面是完整代码。

点击后

完整代码如下

index.html

XML/HTML Code复制内容到剪贴板
  1. nbsp;html>  
  2. html lang="en">  
  3. head>  
  4.     meta charset="UTF-8">  
  5.     title>indextitle>  
  6. head>  
  7.   
  8. index   
  9. a href="http://www.cnblogs.com/czp2016/" frameborder="1">czp_2016のbloga>  
  10. br/>  
  11. iframe src="iframe1.html" frameborder="1" width="800px" height="800px">iframe>  
  12. html>  

iframe1.html

XML/HTML Code复制内容到剪贴板
  1. nbsp;html>  
  2. html lang="en">  
  3. head>  
  4.     meta charset="UTF-8">  
  5.     title>iframe1title>  
  6. head>  
  7. body bgcolor="red">  
  8. iFrame1   
  9. a href="http://www.cnblogs.com/czp2016/" frameborder="1">czp_2016のbloga>  
  10. br/>  
  11. iframe src="iframe2.html" frameborder="0" width="600px" height="600px">iframe>  
  12. body>  
  13. html>  

iframe2.html

XML/HTML Code复制内容到剪贴板
  1. nbsp;html>  
  2. html lang="en">  
  3. head>  
  4.     meta charset="UTF-8">  
  5.     title>iframe2title>  
  6. head>  
  7. body bgcolor="green">  
  8. iFrame2   
  9. a href="http://www.cnblogs.com/czp2016/" frameborder="1">czp_2016のbloga>  
  10. br />  
  11. iframe src="iframe3.html" frameborder="0" width="400px" height="400px">iframe>  
  12. body>  
  13. html>  

iframe3.html

XML/HTML Code复制内容到剪贴板
  1. nbsp;html>  
  2. html lang="en">  
  3. head>  
  4.     meta charset="UTF-8">  
  5.     title>iframe3title>  
  6. head>  
  7. body bgcolor="yellow">  
  8. iFrame3   
  9. a href="http://www.cnblogs.com/czp2016/" frameborder="1">czp_2016のbloga>body>  
  10. html>  

貌似各主流网站没有采用这种布局的,应用范围也比较少了。

以上这篇深入剖析HTML5 内联框架iFrame就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。

原文地址:http://www.cnblogs.com/czp2016/archive/2016/05/04/5450905.html

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
html5 validation for symfony 2.1
From 1970-01-01 08:00:00
0
0
0
The difference between HTML and HTML5
From 1970-01-01 08:00:00
0
0
0
html5 show hide
From 1970-01-01 08:00:00
0
0
0
Can PDF files run HTML5 and Javascript?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template