<iframe src="" allowtransparency="true">

  • IE

The allowtransparency attribute of the IFRAME element specifies whether to allow a transparent background in the iframe.

<iframe src="example.html" allowtransparency="true"></iframe>

Attribute Value Explanation
allowtransparency=" " true allows the transparency
false not allows the transparency (default)

Extension attribute. (Non standard attribute)

If you specify the "true" value for this attribute, add the following CSS for the BODY tag of the page to load into the iframe.

<body style="background-color: transparent;">


The page that sets the iframe

<div style="padding: 10px; background: #ffffff url(image/back2.gif);">

<p><iframe src="iexample_l.html" width="300" height="150" allowtransparency="true">Alternate content</iframe></p>


The page to load into the iframe (iexample_l.html)

<title>TAG index</title>
<body style="background-color: transparent;">

<p>transparent example ...</p>