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
- <! DOCTYPE html>
- <Html lang = "en">
- <Head>
- <Meta charset = "UTF-8">
- <Title> index </title>
- </Head>
- <! -- Note that there is no body element here -->
- Index
- <A href = "http://www.cnblogs.com/czp2016/" frameborder = "1"> czp_2016 guest blog </a>
- <Br/>
- <Iframe src = "iframe1.html" frameborder = "1" width = "800px" height = "800px"> </iframe>
- </Html>
Iframe1.html
Copy XML/HTML Code to clipboard
- <! DOCTYPE html>
- <Html lang = "en">
- <Head>
- <Meta charset = "UTF-8">
- <Title> iframe1 </title>
- </Head>
- <Body bgcolor = "red">
- IFrame1
- <A href = "http://www.cnblogs.com/czp2016/" frameborder = "1"> czp_2016 guest blog </a>
- <Br/>
- <Iframe src = "iframe2.html" frameborder = "0" width = "600px" height = "600px"> </iframe>
- </Body>
- </Html>
Iframe2.html
Copy XML/HTML Code to clipboard
- <! DOCTYPE html>
- <Html lang = "en">
- <Head>
- <Meta charset = "UTF-8">
- <Title> iframe2 </title>
- </Head>
- <Body bgcolor = "green">
- IFrame2
- <A href = "http://www.cnblogs.com/czp2016/" frameborder = "1"> czp_2016 guest blog </a>
- <Br/>
- <Iframe src = "iframe3.html" frameborder = "0" width = "400px" height = "400px"> </iframe>
- </Body>
- </Html>
Iframe3.html
Copy XML/HTML Code to clipboard
- <! DOCTYPE html>
- <Html lang = "en">
- <Head>
- <Meta charset = "UTF-8">
- <Title> iframe3 </title>
- </Head>
- <Body bgcolor = "yellow">
- IFrame3
- <A href = "http://www.cnblogs.com/czp2016/" frameborder = "1"> czp_2016 Weibo blog </a> </body>
- </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