<style type="text/css">
.pngholder{
width:100px;
height:100px;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='ie_icon.png');
}
.pngalpha{
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);
background:url(ie_icon.png) no-repeat;
width:100px;
height:100px;
}
</style>
<!- And this is your code to implement the image ->
<div>透明</div>
<div class="pngholder"><div class="pngalpha"></div></div>
<div>不透明</div>
本文介绍了一种在Internet Explorer浏览器中实现PNG图片透明效果的方法。通过使用特定的CSS样式和滤镜属性,可以确保PNG图像在IE中的显示效果与其他现代浏览器保持一致。此技术对于维护网站跨浏览器兼容性至关重要。
919

被折叠的 条评论
为什么被折叠?



