影响谷歌地图的 Twitter Bootstrap CSS [英] Twitter Bootstrap CSS affecting Google Maps

查看:31
本文介绍了影响谷歌地图的 Twitter Bootstrap CSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Twitter Bootstrap,并有一个 Google 地图.

I'm using Twitter Bootstrap, and have a Google map.

地图上的图像(例如标记)在 Bootstrap 中被 CSS 倾斜.

Images on the map, such as marker are being skewed by the CSS in Bootstrap.

在 Bootstrap CSS 中有:

In the Bootstrap CSS there is:

img {
    border: 0 none;
    height: auto;
    max-width: 100%;
}

当我使用 Firebug 禁用 max-width 属性时,标记图像显示正常.如何防止 Bootstrap CSS 影响 Google 地图图像?

When I disable the max-width property using Firebug, the marker image appears as normal. How can I prevent the Bootstrap CSS from affecting the Google maps images?

推荐答案

使用 Bootstrap 2.0,这似乎可以解决问题:

With Bootstrap 2.0, this seemed to do the trick:

#mapCanvas img {
  max-width: none;
}

这篇关于影响谷歌地图的 Twitter Bootstrap CSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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