我正在使用Twitter Bootstrap,并有一张Google地图。
地图上的图像(例如标记)正由Bootstrap中的CSS倾斜。
在Bootstrap CSS中有:
img {
border: 0 none;
height: auto;
max-width: 100%;
}
当我禁用
max-width
时
使用Firebug属性,标记图像会正常显示。
如何防止Bootstrap CSS影响Google地图图像?
最新回答
- 2021-1-101 #
- 2021-1-102 #
用于地形和叠加层的下拉选择器也存在问题,将两者都添加将解决问题...
#mapCanvas img { max-width: none; } #mapCanvas label { width: auto; display:inline; }
第二种样式会在某些浏览器中处理有关地形和覆盖框的其他问题。
- 2021-1-103 #
为您的地图画布div指定
map_canvas
的ID此引导提交包括
max-width: none
修复IDmap_canvas
(但不适用于mapCanvas
)。 - 2021-1-104 #
这些答案对我都不起作用,因此我进入了div并查看了它的child,我看到了一个新的div,其类别为" gm-style",因此将其放入了CSS :
.gm-style img { max-width: none; } .gm-style label { width: auto; display:inline; }
..并且为我解决了这个问题。
- 2021-1-105 #
您想通过使用max-width覆盖CSS部分中的max-width规则:none; 这似乎是解决此问题的方法
相关问题
- jquery:具有远程Modal的Bootstrap 4jquerycsstwitterbootstrapbootstrap42021-01-11 20:29
- css:Bootstrap 3-连续使用超过12列csstwitterbootstraptwitterbootstrap32021-01-11 03:28
- jquery ui:具有现有样式表的应用程序的CSS框架cssjqueryuitwitterbootstrap2021-01-09 00:21
对于Bootstrap 2.0,这似乎可以解决问题: