iframe background image showing fine in Firefox but not in IE

試著忘記壹切 提交于 2020-01-11 08:47:07

问题


Why IE not showing BG mage like firefox in Iframe?

I do not have access of iframed page.

any CSS or javascript solution


回答1:


As well as adding the CSS style background-color:transparent; to the iframe document's body element, you will also need to add the allowtransparency attribute to the iframe element in the containing document.

See http://msdn.microsoft.com/en-us/library/ms533072(VS.85).aspx for more information.

If you can't modify the iframe's document then you are out of luck. Maybe there's another source you can use for the data that provides it in a different format such as XML or JSON?




回答2:


Add this CSS code to the document that's included by the iframe: background-color:transparent;



来源:https://stackoverflow.com/questions/2056302/iframe-background-image-showing-fine-in-firefox-but-not-in-ie

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!