问题描述
我试过以下内容:
新GTileLayer(null,_minZoom,_maxZoom,{isPng:true,opacity:0.6}) ;
但是在IE8中,尽管alpha不透明起作用,但PNG中已经具有半透明度的像素显示灰色和标准不透明。
我还注意到,包含alpha透明度和透明度的PNG文件未被HTML样式设置修改,在IE8中表现良好,只有在将PNG alpha透明度和HTML alpha透明度应用于同一图像时才会出现。 解决方案
我试过以下内容:
新GTileLayer(null,_minZoom,_maxZoom,{isPng:true,opacity:0.6}) ;
但是在IE8中,尽管alpha不透明起作用,但PNG中已经具有半透明度的像素显示灰色和标准不透明。
我还注意到,包含alpha透明度和透明度的PNG文件未被HTML样式设置修改,在IE8中表现良好,只有在将PNG alpha透明度和HTML alpha透明度应用于同一图像时才会出现。 解决方案
这绝对是一个众所周知的错误 - 请参阅,和。只是抛出几个链接:
I tried the following
new GTileLayer(null, _minZoom, _maxZoom, { isPng: true, opacity: 0.6 });
But in IE8, while the alpha opacity works, the pixels in the PNG that already had translucence they show a grey color and standard opacity.
I have noticed also that PNG files that contain alpha transparency and their transparency is not modified by HTML style settings behave well in IE8, the problem occurs only when both PNG alpha transparency and HTML alpha transparency are applied to the same image.
It's definitely a well-known bug - see here, here, and here. Just to throw a few links:
And then there's this addressing a probably different bug in an early release of IE8. He got it solved by enlarging the image - maybe worth a try if you're working with a 1x1 image.
Maybe you can work around this by using different pngs with different opacities, and no CSS opacity?
这篇关于如何在IE8中使Google Maps半透明PNG图块层工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!