I need to have a (crossdomain) iframe with dynamic width and height.
My question is, Can I create an iframe with 100% size and a transparent background that will show the parent of this iframe, behind it ?
Can I attach a css property or a transparent gif for the iframe background to make that effect ?
Thanks.
A transparent iframe can be made by setting its background to transparent. And, the allowtransparency attribute of “iframe” is to be set as “true”.
document. body. style. backgroundColor = 'white'; }, delayInMilliseconds);
Inline frames (shortened to iFrames) were introduced in the late 1990s by Microsoft, making it one of the oldest HTML tags. From a technology perspective, it's ancient. That said, there are still some legitimate use cases for iFrames.
The <iframe> element is still valid in HTML5. Depending on what exact interaction you need there might be different APIs. For example there's the postMessage method which allows you to achieve cross domain javascript interaction.
yes you can (if i understand your question correctly)
heres the code if you have edit access to the iframe content put this in the head (of the iframe)
<style type="text/css"> <!-- BODY {background:none transparent;}--> </style>
and then embed the iframe like this
<iframe src="frame.htm" allowtransparency="true">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With