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

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

问题描述

我尝试了以下

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

但在 IE8 中,虽然 alpha 不透明度有效,但 PNG 中已经具有半透明的像素显示为灰色和标准不透明度.

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.

我还注意到,包含 alpha 透明度且其透明度不会被 HTML 样式设置修改的 PNG 文件在 IE8 中表现良好,仅当 PNG alpha 透明度和 HTML alpha 透明度应用于同一图像时才会出现问题.

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:

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

然后是 this 解决了 IE8 早期版本中可能不同的错误.他通过放大图像解决了这个问题 - 如果您使用的是 1x1 图像,也许值得一试.

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.

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

Maybe you can work around this by using different pngs with different opacities, and no CSS opacity?

这篇关于如何使谷歌地图半透明 PNG 瓦片层在 IE8 中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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