透明身体的iFrame [英] Transparent Iframe Body
问题描述
我需要有动态的宽度和高度(跨域)iframe中。
I need to have a (crossdomain) iframe with dynamic width and height.
我的问题是,
我可以创造100%的大小和透明背景的iframe,将显示这个iframe的父,落后吗?
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 ?
我可以附上了iframe的背景CSS属性或透明的gif来作出这样的效果呢?
Can I attach a css property or a transparent gif for the iframe background to make that effect ?
感谢。
推荐答案
是的,你可以(如果我没有理解你的问题)
(我这里这样做)
yes you can (if i understand your question correctly) (i've done this here)
继承人的code
如果你有iframe内容的编辑权限,把这个头部(iframe的)
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>
然后嵌入的iframe这样
and then embed the iframe like this
<iframe src="frame.htm" allowtransparency="true">
这篇关于透明身体的iFrame的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!