将Transperancy设置为模态弹出窗口内的iFrame

我在后台显示一个pdf,顶部有一个Popup,其中包含一个iFrame,我想为弹出窗口设置透明度。 它在Chrome浏览器和浏览器的其余部分完美无效:(这里是Fiddler链接: 点击这里

请告诉我如何在所有浏览器中工作。

在此处输入图像描述在此处输入图像描述

在此处输入图像描述

使用一点点javascript和CSS这应该不是什么大问题,虽然iframe需要包含在div中,或者其他事情:

然后在你的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