2012-07-26 15 views
0

我在後臺顯示一個pdf,並在頂部彈出一個包含iFrame的Popup,我想將透明度設置爲彈出窗口。 它完美的Chrome瀏覽器和瀏覽器的其餘它不工作:(這裏是小提琴手鍊接:Click Here設置Transfrancy到iFrame內部模式彈出

請告訴我,我該怎麼做,在所有瀏覽器的工作

enter image description hereenter image description here

enter image description here

回答

-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 
+0

正如我在文章中說透明度工作在Chrome,但它不工作的IE瀏覽器 – 2014-02-27 04:49:25