我也不得不关掉盒子阴影,因为我的包含顺序,我添加了!important标志。
#mapCanvas img { max-width: none !important; box-shadow: none !important; }
为地图canvas div提供id map_canvas 。
map_canvas
这个引导程序提交 包括 max-width: none 修复id map_canvas (但它不会起作用 mapCanvas )。
max-width: none
mapCanvas
使用gmap4rails gem更改#MapCanvas并不适用于我们,但是当我们更改为时,确实没有
.map_container img { max-width: none; } .map_container label { width: auto; display:inline; }
使用Bootstrap 2.0,这似乎可以解决问题:
#mapCanvas img { max-width: none; }
最新的twitter bootstrap 2.0.4直接包含此修复程序。
如果要将内容包装在a(div class =“container”)中,就像在twitter bootstrap的演示页面中那样,你应该添加一个style =“height:100%”
您希望使用max-width:none覆盖CSS部分中的max-width规则;这似乎是解决这个问题的方法
我正在使用gmaps4rails,这个修复程序为我做了:
.gmaps4rails_map img { max-width: none; } .gmaps4rails_map label { width: auto; display:inline; }
在任何浏览器中使用Print打印地图也存在问题。该 img { max-width: 100% !important; } 将不会被上面的代码修复: 的 你需要添加一个 !important 这样的声明: 强>
img { max-width: 100% !important; }
!important
@media print { img { max-width: auto !important; } }
这些答案都没有对我有用,所以我进入了我的div,看着它的孩子,我看到了一个新的div,类为“gm-style”,所以我把它放在我的CSS中:
.gm-style img { max-width: none; } .gm-style label { width: auto; display:inline; }
..那解决了我的问题。
所有答案都是max-widht:none
对我来说,max-height:继承工作.....
人们正在使用#map,#map_canvas等。看看你的父div。 如果它是蓝色的,那么它将是#blue img {}