使用iframe调用的页面,在IE下(不包括IE9)会以白色背景显示(被调用页面没有设置背景颜色,以及系统的背景颜色默认为白色),如何让其透明?
网络上已经有很多答案:
在iframe标签中加上 allowTransparency="true" 属性
即:
<iframe src="iframe.html" width="600px" height="500px" allowtransparency="true" scrolling="no" frameborder="0"></iframe>
有人说,被调用的页面的body中要加上style="background-color:transparent",其实是没有必要的,在IE5.5以上(不包括)版本中,已经没有必要使用。
allowTransparency属性是针对iframe的特殊属性,仅对ie起到一定的作用,而其属性值,即上文提到的“true”则是
不必须的,也就是说只要iframe中有allowTransparency属性存在,无论其值为多少,哪怕是“false”,也会对IE中iframe的透明起到作用,这也自然说明,其不用定义值也可以起到作用,那么
在iframe只用加入“allowTransparency”即可。
即:
<iframe src="iframe.html" width="600px" height="500px" allowtransparency scrolling="no" frameborder="0"></iframe>
分享到:
相关推荐
本例主要是iframe对象的allowTransparency属性应用,在该属性设置为true并且iframe所载加页的背景颜色设置为transparent(透明)时iframe将透明化。 allowTransparency设置或获取对象是否可为透明。 bgColor 设置或...
最近在做项目的过程中需要频繁的使用iframe画页面的层级框架,大部分浏览器是没有背景的,但是iframe在IE中默认是有一个白色的背景色的,当主背景色不是白色的时候,在这一部分会显得很突兀。帮助手册中给出了解决...
iframe src="./ads_top_tian.html" allowtransparency="true" style="background-color=transparent" title="test" frameborder="0" width="470" height="308" scrolling="no"></iframe>
iframe使用方法: 复制代码代码如下:<DIV align=center><IFRAME src=”” frameBorder=0 marginwidth=0 marginheight=0 scrolling=no style=”width168:px;height:50px;” width=168 height=50 scrolling=no ...
问题:在index.html 中,iframe 引入son.html,在son.html 中如何点击某个操作,实现屏蔽整个页面,并弹出要显示的层? 准备: index.html son.html 思路: 一:index.html中iframe引入son.html , 复制代码代码...
IE浏览器支持一个 Body 属性 bgproperties,它可以让背景不滚动: 〈Body Background="图片文件" bgproperties="fixed"〉 02.让你的网页无法另存为 <noscript><iframe src=*></iframe>...
iframe src=”you page’s url” width=”100″ height=”30″ frameborder=”no” border=”0″ marginwidth=”0″ marginheight=”0″ scrolling=”no” allowtransparency=”yes”></iframe> <...
iframe src=”test.jsp” width=”100″ height=”50″ frameborder=”no” border=”0″ marginwidth=”0″ marginheight=”0″ scrolling=”no” allowtransparency=”yes”></iframe> <iframe runat...
sina微博:<iframe width=”120″ height=”24″ frameborder=”0″ allowtransparency=”true” marginwidth=”0″ marginheight=”0″ scrolling=”no” border=”0″ src=”...</iframe QQ空间:<...
调用的话,在调用位置添加以下代码: <script type="text/javascript">document.write('<iframe src="{APP_PATH}index.php?m=member&c=index&a=mini&forward='+encodeURIComponent(location.href)+'&siteid={get_...
scrolling="no" allowtransparency="yes"></iframe> 设置html内容,获取html内容,监听内容变化,初始化完成事件 var ueIframeWin = document.getElementById("editormd").contentWindow; setTimeout...
设div的背景色透明时,只要一句话 background:transparent; 设置frame的背景色透明时 框架对应的页面background:transparent; 框架还要设置一个属性 allowTransparency="true" 这样就OK了
修改方法文件中有说明。 2,上传到论坛自建flash目录 3,在后台添加页内文字广告-广告代码 <IFRAME src="http://www.bikelx.com/flash/index.htm" frameBorder=0 width="100%" scrolling=yes...
iframe src =“ ” width =“ 100%” height =“ 250” frameborder =“ 0” allowtransparency =“ true” allow =“ encrypted-media”> </ iframe>支持Saweran 别忘了NGUPUK锯床,这样我们就可以在连续...
ng-widgets 是一个充满你在 angular 中缺少的东西的库。 引导组件 网格、列表 形式 每天越来越多…… 快速开始 包括ng-widgets.js [removed][removed] 使用ng-widgets作为其依赖项定义 angular.js模块 angular ...
来浏览“ i”,“ 0”,“ len”,最后停在“ /* cursor */ ”浏览和基本用法C骨架C宏C for循环和包装器C if-else-elsePython选项参数Python def和class中的defPython内联完成Python try-except可以是包
Discogs社交按钮使用这三个简单的社交媒体按钮在您的网站上显示Discogs个人资料,这些按钮具有动态收集,库存或需求列表计数。用法将此标记放入您的页面: < iframe src =" ...
您好,我是Bot.exe, 我可以做一些非常基本的操作...iframe src =“ ” width =“ 350” height =“ 500” allowtransparency =“ true” frameborder =“ 0” sandbox =“ allow-popups allow -popups到沙盒逃生allow
iframe src =“ ” width =“ 300” height =“ 380” frameborder =“ 0” allowtransparency =“ true” allow =“ encrypted-media”> < / iframe>( ) 与我联系: 语言和工具: :television: 最新的...
iframe src =“ // benschwarz.github.io/bower-badges/embed.html?pkgname=” width =“ 160” height =“ 32” allowtransparency =“ true” frameborder =“ 0” scrolling =“ 0”> </ iframe> 一种将...