Home > Article > Web Front-end > Detailed explanation of the allowTransparency attribute of iframe in html
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!