A summary of learning html:iframe usage

Source: Internet
Author: User

<iframe> is a form of the framework, also more commonly used.

Example 1.

<iframe width=420 height=330 frameborder=0 scrolling=auto src=url></iframe>

Don't say much.

Width inserts the width of the page; height inserts the page's height; scrolling whether the page scroll bar is displayed (optional parameters are auto, yes, no, and if this argument is omitted, the default is auto); frameborder border size;

Note: URLs suggest absolute paths

Legend of the Hundred du used: <iframe width=0 height=0 frameborder=0 scrolling=auto src=www
Black 88*8 ...

Example 2.

If there is a frame inside a page ... Click on the link in the page and ask to be opened in this <iframe>. Add name=** to IFRAME (* * Set yourself)

<iframe name=** ></iframe>

Then modify the default open mode: The target frame of the web head plus <a href=url target=**> or partially connected is set to (* *)

Example 3.

To insert a page. Ask to take only the middle part. None of the others. ,。。

Code:

<iframe name=123 align=middle marginwidth=0 marginheight=0 vspace=-170 hspace=0 src= "http://www.webjx.com/" Frameborder=no Scrolling=no width=776 height=2500></iframe>

Controls the depth marginwidth=0 marginheight=0 that the insertion page is covered by the frame, and the depth of the upper part of the control frame vspace=-170

Scrolling whether the scroll bar (auto, yes, no) frameborder the frame's border size, width=776 height=2500 the size of the frame.

One, the page to join the IFRAME

<iframe width=420 height=330 frameborder=0 scrolling=auto src=url></iframe>
Scrolling indicates whether the page scroll bar is displayed, the optional parameter is auto, yes, and no, and if this argument is omitted, auto is the default.

Second, the hyperlink to the embedded Web page, as long as the name of the IFRAME can be. The method is <iframe Name=**>, for example I named AA, to write this HTML language <iframe width=420 height=330 name=aa frameborder=0 Www.cctv.com></iframe>, and then, the hyperlink statement on the page should be written as: <a Href=url target=aa>

If the frameborder set to 1, the effect is like a text box

The use of transparent IFRAME

Must IE5.5 above version to support

In the <body> tag of transparentbody.htm file, I have joined style= "Background-color=transparent" The following four kinds of IFRAME are written I think maybe you should have a clear understanding of the implementation of an IFRAME background transparency effect:

<iframe id= "Frame1" src= "transparentbody.htm" allowtransparency= "true" ></IFRAME>

<iframe id= "Frame2" src= "transparentbody.htm" allowtransparency= "true" style= "Background-color:green" > </ Iframe>

<iframe id= "Frame3" src= "transparentbody.htm" ></IFRAME>

<iframe id= "Frame4" src= "transparentbody.htm" style= "Background-color:green" > </IFRAME>



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.