使png图片在ie6浏览器下也支持透明
没有使用滤镜来修正ie下png透明的效果,这样会出现灰色的边。
<style> body{background:#000000;margin:100px;}.kuang{background:url(/images/kuang.png) no-repeat center center ;width:134px;height:144px;} </style> <div class="kuang"></div>
使用滤镜及important【for w3c】后,灰色边框不见了,效果一比较就知道
<style> body{background:#000000;margin:100px;}.kuang{background:url(/images/kuang.png) no-repeat center center !important/*w3c浏览器*/;width:134px;height:144px;background:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/kuang.png',sizingMethod='scale');/*用滤镜修正ie*/} </style> <div class="kuang"></div>
加支付宝好友偷能量挖...
原创文章,转载请注明出处:使png图片在ie6浏览器下也支持透明