How to remove the inherited HTML and body background color/background image from the inner embedded area of the IFRAME element

Source: Internet
Author: User

How to Implement IFRAME transparency and teach you to remove the background color!

The IFRAME element is used to embed a document in a document to create a floating frame. Embedded documents are a complete page with attributes such as HTML and body. In this case, if the style sheet defines the background color/background image for the body, all embedded documents will be inherited. So how to remove the background color and background image:

[1] Remove the background color: filter: chroma (color = white );

Example: <IFRAME width = "100%" Height = "400" marginwidth = "0" marginheight = "0" scrolling = "no" frameborder = "0" leftmargin = "0" topmargin =" 0"Style = "filter: chroma (color = white);" > </Iframe>

[2] Remove the background image:

Example: <IFRAME width = "100%" Height = "400" marginwidth = "0" marginheight = "0" scrolling = "no" frameborder = "0" leftmargin = "0" topmargin =" 0"Style = "filter: chroma (color = white);" allowtransparency = "true"> </Iframe> 

Note: You must also add the body attribute to the embedded page:

<BodyBgcolor = "Transparent" style = 'background: transparent'>

OK! Success

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.