0

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.

enter image description hereenter image description here

enter image description here

4

1 回答 1

-1

使用一点 javascript 和 CSS 这应该没什么大不了的,尽管 iframe 需要被包裹在一个 div 中,或者类似的东西:

<div id="iframeContainer">
    <iframe src="http://example.com"></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
于 2012-08-06T09:28:57.893 回答