设置Transperancy要iframe中模式弹出 [英] Setting Transperancy To iFrame Inside Modal Popup

查看:262
本文介绍了设置Transperancy要iframe中模式弹出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我显示在后台PDF格式,并在其中包含一个iFrame我想设置的透明度,在弹出的顶部弹出。
它完美的Chrome浏览器和浏览器的它不工作:(这里剩下的就是小提琴手链接:请点击这里

I am showing a pdf in the background and a Popup over the top which contains an iFrame I want to set the transparency to the popup. It works perfectly in Chrome browser and the rest of the browser it doesn't work :( Here is the Fiddler Link : Click Here

请告诉我,我该怎么做,在所有的浏览器。

Please Tell Me What should i do to work in all the browsers.

推荐答案

随着一点点的JavaScript和CSS这应该没有什么大问题,但在iframe将需要包裹在一个div,或该事项的内容:

With a little javascript and CSS this should be no biggie, though the iframe will need to be wrapped in a div, or something of the matter:

<div id="iframeContainer">
    <iframe src="http://example.com"></iframe>
</div>

然后在您的javascript:

Then in your javascript:

// Set the css opacity of the div NOT the iframe:
iframeContainer.style.opacity = 0.5; // the closer to 1 the less transparent
iframeContainer.style.MozOpacity=0.5; // the closer to 1 the less transparent
iframeContainer.style.filters.alpha.opacity=50; // the closer to 100 the less transparent

这篇关于设置Transperancy要iframe中模式弹出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆