background-color: transparent;
The background-color property specifies the background color of an element.
The transparent iframe can be set by applying this property to the BODY element.
body {
background-color: transparent;
}
Apply this style to the BODY element of the page to load into the iframe.
Property |
Value |
Explanation |
background-color |
transparent |
transparent background color |
In MSIE, the allowtransparency attribute must be specified for the IFRAME element at the same time.
<iframe src="example.html" allowtransparency="true"></iframe>
Example