当谷歌地图加载时,Safari v5隐藏div [英] Safari v5 hides div when google maps loaded

查看:126
本文介绍了当谷歌地图加载时,Safari v5隐藏div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac上遇到Safari v5的问题。当我的Google Map Api加载到页面时,它隐藏了我的其他div(绝对定位)。页面呈现正确,直到地图加载。如果我有一个没有地图的页面,问题不会发生。



例如:

我已经在firefox中进行了测试,例如chrome和safari v4,并且这个问题不会被复制,只会出现在safari v5中。



任何建议都会被推断出来,谢谢。

解决方案

z-index与此无关错误。

阅读完以下文章后:
http://code.google.com/p/gmaps-api-issues/issues/detail?id=3190



我能够通过做两件事来解决我的问题。第一个是修改我的CSS中text-indent的值为9999px或以下的每个条目。我为所有图标按钮使用了文本缩进,无论它来自jQuery UI css还是来自我的css。设置超过9999px为我创建的问题。



第二个问题在文本缩进被修复之后,出现了模糊的字体。以下内容帮助解决了这个问题:

  * {
-webkit-font-smoothing:subpixel-antialiased!important;
-webkit-transform:none!important;
}

这两篇文章都在文章中提到,但我发现文本缩进需要比建议的小。


I am having a problem with Safari v5 on mac. When my Google Map Api is loaded into the page it hides some of my other divs (which are absolutely positioned). The page renders correctly until the map loads. If i have a page without a map the problem does not happen.

example: www.morecambe-lodge.co.uk

it also seems to interfere with the loading of jquery ui. Is there a better way to lazy load google maps or a solution. i have tried document ready and window.onload methods but it still persists with the problem.

I have tested in firefox, ie, chrome and safari v4 and this problem is not replicated only seems to happen in safari v5.

Any advice would be greeatly apreciated, Thanks.

解决方案

The z-index has nothing to do with this bug.

After I read through the following article: http://code.google.com/p/gmaps-api-issues/issues/detail?id=3190

I was able to fix my issue by doing two things. The first was modifying every entry in my CSS that had "text-indent" to have a value of 9999px or under. I use text-indent for all my icon buttons, whether it comes from jQuery UI css or from my css. Having it set over 9999px created issues for me.

The second problem, after the text-indent was fixed, was having blurry fonts. The following helped solve this issue:

* {
    -webkit-font-smoothing: subpixel-antialiased !important;
    -webkit-transform: none !important;
  }

Both of these are mentioned in the article, but I found that the text indent needed to be smaller than what was suggested.

这篇关于当谷歌地图加载时,Safari v5隐藏div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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