除了IE之外的其他浏览器,默认情况下IFrame都是透明的。但IE下默认是白色背景的。那么,如何让IE下的IFrame也能透明呢?
这时,我们就需要用到一个特殊的特性了:

ALLOWTRANSPARENCY="true"

同时,在IFrame中的页面要加上:

<body STYLE="background-color:transparent">

这样就搞定了。

还有一种方法修饰:

iframe.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';

相关文章:

  • 2021-07-25
  • 2021-06-30
  • 2021-06-22
  • 2021-12-26
  • 2021-10-16
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-01-27
  • 2021-11-06
相关资源
相似解决方案