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

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

May 30, 2016 pm 05:07 PM
html5 iframe

由于现在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

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

Moving Text in HTML Moving Text in HTML Sep 04, 2024 pm 04:45 PM

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

HTML onclick Button HTML onclick Button Sep 04, 2024 pm 04:49 PM

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.

HTML Input Placeholder HTML Input Placeholder Sep 04, 2024 pm 04:54 PM

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

See all articles