本文目录一览:
1、怎么设置iframe,才能使背景透明?2、浏览器中怎么让iframe框架背景透明或不显示3、如何让iframe背景色透明4、怎样使得frame的背景变透明如果想让iframe背景透明。这里需要用到iframe一个特殊的属性:allowtransparency="true"。1、首先在框架代码中加入allowtransparency属性:2、把嵌入iframe中的页面改为:楼主,你试试!应该可以解决!
【资料图】
iframe allowtransparency="true"/iframe
在transparentBody.htm文件的body标签中,我已经加入了style="background-color=transparent" 通过以下四种IFRAME的写法我想大概你对iframe背景透明效果的实现方法应该会有个清晰的了解:
IFRAME ID="Frame1" SRC="transparentBody.htm" allowTransparency="true"/IFRAME
IFRAME ID="Frame2" SRC="transparentBody.htm" allowTransparency="true" STYLE="background-color: green" /IFRAME
IFRAME ID="Frame3" SRC="transparentBody.htm"/IFRAME
IFRAME ID="Frame4" SRC="transparentBody.htm" STYLE="background-color: green" /IFRAME
方法一:
iframe src="ifraem.jsp" width="100%" height="360" align="center"
scrolling="auto" frameborder="0"
style="filter:chroma(color=#ffffff)"/iframe
在iframe页面里将body更改为:
body
方法二:
iframe
src="abc.htm" name="iframe" width="540" height="400" scrolling="Auto"
frameborder="0" id="iframe"
allowtransparency="true"/iframe
被嵌的页面加入:
body
ie下需要给iframe标签添加allowTransparency属性,
iframe allowTransparency="true" src="{url}"/iframe
frame页面的html和body指定背景色为透明色
style type="text/css"
html,body{
background-color:transparent;
}
/style
以上就是小编对iframe透明的相关信息分享,希望能对大家有所帮助。
标签: