In-depth analysis of HTML5 inline frameworks iFrame and html5iframe

Source: Internet
Author: User

In-depth analysis of HTML5 inline frameworks iFrame and html5iframe

Currently, frame and frameset are rarely used and are out of date and replaced by div + CSS. Here is an example of the inline framework iFrame currently in use.

The so-called iFrame inline framework, in my understanding, is to nest a webpage inside the webpage, and can be nested at a level.

Example:

/*

The example consists of index.html and iframe1.html?iframe2.html=iframe3.html.

*/

First upload the image, followed by the complete code.

After clicking

The complete code is as follows:

Index.html

Copy XML/HTML Code to clipboard
  1. <! DOCTYPE html>
  2. <Html lang = "en">
  3. <Head>
  4. <Meta charset = "UTF-8">
  5. <Title> index </title>
  6. </Head>
  7. <! -- Note that there is no body element here -->
  8. Index
  9. <A href = "http://www.cnblogs.com/czp2016/" frameborder = "1"> czp_2016 guest blog </a>
  10. <Br/>
  11. <Iframe src = "iframe1.html" frameborder = "1" width = "800px" height = "800px"> </iframe>
  12. </Html>

Iframe1.html

Copy XML/HTML Code to clipboard
  1. <! DOCTYPE html>
  2. <Html lang = "en">
  3. <Head>
  4. <Meta charset = "UTF-8">
  5. <Title> iframe1 </title>
  6. </Head>
  7. <Body bgcolor = "red">
  8. IFrame1
  9. <A href = "http://www.cnblogs.com/czp2016/" frameborder = "1"> czp_2016 guest blog </a>
  10. <Br/>
  11. <Iframe src = "iframe2.html" frameborder = "0" width = "600px" height = "600px"> </iframe>
  12. </Body>
  13. </Html>

Iframe2.html

Copy XML/HTML Code to clipboard
  1. <! DOCTYPE html>
  2. <Html lang = "en">
  3. <Head>
  4. <Meta charset = "UTF-8">
  5. <Title> iframe2 </title>
  6. </Head>
  7. <Body bgcolor = "green">
  8. IFrame2
  9. <A href = "http://www.cnblogs.com/czp2016/" frameborder = "1"> czp_2016 guest blog </a>
  10. <Br/>
  11. <Iframe src = "iframe3.html" frameborder = "0" width = "400px" height = "400px"> </iframe>
  12. </Body>
  13. </Html>

Iframe3.html

Copy XML/HTML Code to clipboard
  1. <! DOCTYPE html>
  2. <Html lang = "en">
  3. <Head>
  4. <Meta charset = "UTF-8">
  5. <Title> iframe3 </title>
  6. </Head>
  7. <Body bgcolor = "yellow">
  8. IFrame3
  9. <A href = "http://www.cnblogs.com/czp2016/" frameborder = "1"> czp_2016 Weibo blog </a> </body>
  10. </Html>

It seems that mainstream websites do not adopt this layout, and the application scope is also relatively small.

The above in-depth analysis of the HTML5 inline framework iFrame is all the content that I have shared with you. I hope to give you a reference and support for the help house.

Address: http://www.cnblogs.com/czp2016/archive/2016/05/04/5450905.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.