Twitter Bootstrap CSS影响Google地图 [英] Twitter Bootstrap CSS affecting Google Maps
本文介绍了Twitter Bootstrap CSS影响Google地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用的是Twitter Bootstrap,并有一张Google地图。
地图上的图片,例如标记在Bootstrap中被CSS扭曲。 p>
在Bootstrap CSS中有:
img {
border:0 none;
height:auto;
max-width:100%;
}
当我禁用 max-width
属性使用Firebug,标记图像显示正常。
如何防止Bootstrap CSS影响Google地图图片?
解决方案
做诀窍:
#mapCanvas img {
max-width:none;
}
I'm using Twitter Bootstrap, and have a Google map.
Images on the map, such as marker are being skewed by the CSS in Bootstrap.
In the Bootstrap CSS there is:
img {
border: 0 none;
height: auto;
max-width: 100%;
}
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?
解决方案
With Bootstrap 2.0, this seemed to do the trick:
#mapCanvas img {
max-width: none;
}
这篇关于Twitter Bootstrap CSS影响Google地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文