如何在IE8中使Google Maps半透明PNG图块层工作? [英] How to make a Google Maps semi-transparent PNG tile layer work in IE8?

查看:202
本文介绍了如何在IE8中使Google Maps半透明PNG图块层工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试过以下内容:

 新GTileLayer(null,_minZoom,_maxZoom,{isPng:true,opacity:0.6}) ; 

但是在IE8中,尽管alpha不透明起作用,但PNG中已经具有半透明度的像素显示灰色和标准不透明。



我还注意到,包含alpha透明度和透明度的PNG文件未被HTML样式设置修改,在IE8中表现良好,只有在将PNG alpha透明度和HTML alpha透明度应用于同一图像时才会出现。 解决方案

这绝对是一个众所周知的错误 - 请参阅 此处 此处 <强>此处 。只是抛出几个链接:


  • 此博客 提供了一种使用IE特定技术的解决方法。

  • 此博客 对解决方法有一个简单的解释。 这个解决了IE8早期版本中可能存在的不同错误。他通过放大图像解决了问题 - 如果你使用1x1图像,也许值得一试。

    也许你可以通过使用不同的png来解决这个问题不透明,没有CSS不透明?


    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:

    • This blog offers a workaround using a IE specific technique.
    • This blog has a lenghty explanation for the workaround.

    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图块层工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆