Home > Web Front-end > CSS Tutorial > How to set iframe background transparency_Basic Tutorial

How to set iframe background transparency_Basic Tutorial

WBOY
Release: 2016-05-16 12:03:41
Original
2271 people have browsed it

IE5.5 begins to support transparent content of floating frames. If you want to define transparent content for a floating frame, the following conditions must be met.
1. The allowTransparency tag attribute used with iframe elements must be set to true.
2. In the iframe content source document, the bgColor tag attribute of the background-color or body element must be set to transparent

Copy code The code is as follows:



Of course, the premise is that the color is not set in the iframe page.
In the above we mainly see a sentence in style Code style="background-color=transparent" Through the following four ways of writing IFRAME, I think you should have a clear understanding of how to achieve the iframe background transparency effect:
Copy code The code is as follows:





Now let's look at an example
This example It is mainly applied to the allowTransparency attribute of the iframe object. When this attribute is set to true and the background color of the page loaded in the iframe is set to transparent, the iframe will be transparent.
allowTransparency sets or gets whether the object can be transparent.
bgColor sets or gets the background color of the object

Parent page

Copy code The code is as follows:



parent page




Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template