今天对mapeasy增加了一层绘图层,前面工作一切顺利,到了最后发现当两层DIv叠加的时候,如果上层是透明的背景色,并且下层中含有内容(图片,文本。。)时在内容出现的地方,上层的DiV无法扑捉到任何事件。后来查资料得知原来是IE故意这样做的,目的为了实现某些特殊的事件模型,官方相关文档如下:
http://support.microsoft.com/kb/262559/zh-cn
按其说法有两种解决方法:
In certain cases, you may want to have a transparent DIV element receive events. You can do this in two different ways under Internet Explorer 5.5:
http://support.microsoft.com/kb/262559/zh-cn
按其说法有两种解决方法:
In certain cases, you may want to have a transparent DIV element receive events. You can do this in two different ways under Internet Explorer 5.5:
• | Use the CSS alpha filter to set the background color of the DIV to white and set the opacity to 0 (zero) as follows:
<DIV STYLE="BACKGROUND-COLOR: white; FILTER: alpha(opacity=0);">This results in a fully transparent DIV that includes the content. |
• | Specify a 1-by-1 pixel transparent Graphics Interchange Format (GIF) background as follows:
<DIV STYLE="BACKGROUND: url(trans.gif) repeat;"> |