Home >Web Front-end >HTML Tutorial >Detailed explanation of the allowTransparency attribute of iframe in html

Detailed explanation of the allowTransparency attribute of iframe in html

黄舟
黄舟Original
2017-07-21 11:30:4012441browse

IE5.5 begins to support the content transparency 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.
Specific steps: 1. Include the code of the frame page.

<body bgColor="#eeeeee">
<iframe allowTransparency="true" src="transparent.htm">
</iframe>

2. The code of the transparent.htm page.

<body bgColor="transparent">



Special Note
This example mainly applies the allowTransparency attribute of the iframe object. When this attribute is set to true and the iframe The iframe will become transparent when the background color of the loading page is set to transparent.
allowTransparency sets or gets whether the object can be transparent.

bgColor Sets or gets the background color of the object.

The above is the detailed content of Detailed explanation of the allowTransparency attribute of iframe in html. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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