Bing 地图:删除 IE8 中信息框上的阴影
我试图做出的这个小小的修正让我发疯。希望你们中有人以前遇到过这个问题。
因此,我正在使用“Bing Maps Ajax Control 7.0 ISDK”,并尝试在我的图钉悬停时创建我自己的自定义信息框(弹出框)。
除了删除 IE8 中信息框上的框阴影之外,一切都很好。我已应用以下 CSS 来取消任何常规 CSS 阴影属性。
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
它适用于 Chrome、Firefox 等。问题在于 IE8,其中 Bing CSS 文件将其添加到信息框:
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#888888')";
现在我几乎用尽了覆盖此样式的任何方法。我已经添加到我自己的样式表中,尝试使用背景图像,尝试在 JS 中为我的地图功能添加覆盖,方法是将其直接添加到我的 html 中作为 Infobox 选项对象中的“htmlcontent”参数。运气不好。
有人知道如何去除这个阴影吗?
谢谢 克雷格
This tiny ammend i am trying to make is driving me nuts. Hopefully one of you guys have come across this issue before.
So i am using the 'Bing Maps Ajax Control 7.0 ISDK' and am trying to create my own custom Infobox (popup box) on hover of my pin.
All good apart from removing a box shadow on the Infobox in IE8. I have applied the following CSS to cancel any regular CSS shadow properties.
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
Which works in Chrome, Firefox etc. The issue is with IE8 where the Bing CSS file is adding this to the Infobox:
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='#888888')";
Now i have pretty much exhausted any methods of overriding this style. I have added to my own stylesheets, tried using a background image instead, tried adding an override in the JS for my maps functionality by adding it directly to my html for the 'htmlcontent' param in the Infobox options object. No luck.
Anyone know how I can remove this shadow?
thanks
Craig
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
老实说,尝试覆盖默认信息框是危险的,不建议这样做,因为 bing 明天可能会更改信息框的 css 类或 ids,而您的 hack 将停止工作。我建议您查看此处的自定义信息框控件,无论如何它都更好,然后您就可以完全控制:
http://bingmapsv7modules.codeplex.com/wikipage?title=Custom%20Infobox%20Control
to be honest trying to override the default infobox is dangerous and not recommended because bing could change the infobox's css class or ids tomorrow and you hack would stop working. I recommend you look at the custom infobox control here, its better anyway and then you have complete control:
http://bingmapsv7modules.codeplex.com/wikipage?title=Custom%20Infobox%20Control