• 方法1:
代码
<title>Alpha</title>
<!--[if IE 6]>
<style type="text/css">
div.pngpic{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/alpha.png',sizingMethod="scale");width:677px;height:53px;}
div.pngpic img{display:none;}
</style>
<![endif]
-->
</head>
如果要使用png滤镜,元素必须为块级。且必须制定高度和宽度。
<body style="background:#888;">
<div class="pngpic"><img src="images/alpha.png" /></div>
</body>
  • 方法2:

http://labs.unitinteractive.com/unitpngfix.php(原来这个方法更完美,可以同时包含背景图片)

但是,作为代价,背景图片的background-position属性等将失去作用。哎!貌似也不是很完美!

用法:

<!--[if lt IE 7]>
<script type="text/javascript" src="unitpngfix.js"></script>
<![endif]
-->

还要注意js文件里面的图片路径

var clear="clear.gif"; //path to clear.gif

下载地址:http://labs.unitinteractive.com/downloads/unitpngfix.zip

  • 期待方法3~~

 

相关文章:

  • 2021-11-27
  • 2022-01-06
  • 2022-02-22
  • 2021-09-06
  • 2022-02-13
  • 2021-11-20
  • 2021-11-18
猜你喜欢
  • 2022-01-20
  • 2021-12-04
  • 2021-11-20
  • 2021-11-20
  • 2021-09-08
相关资源
相似解决方案