Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在使用css框架时不弄乱样式_Css_Google Maps_Twitter Bootstrap - Fatal编程技术网

如何在使用css框架时不弄乱样式

如何在使用css框架时不弄乱样式,css,google-maps,twitter-bootstrap,Css,Google Maps,Twitter Bootstrap,我正在使用谷歌地图API V3和Twitter引导,下面是我得到的。该标记甚至不能被识别为标记,缩放工具也不见了。 Twitter boostrap似乎把地图画布的样式搞砸了。有没有办法将某个元素排除在特定框架的样式之外?或者仅仅在地图画布上重置样式,这样它就不会受到twitter引导的样式表的影响 除了twitter引导的样式之外,这里还有一些代码: <style type="text/css"> html { height: 100% } body{ h

我正在使用谷歌地图API V3和Twitter引导,下面是我得到的。该标记甚至不能被识别为标记,缩放工具也不见了。

Twitter boostrap似乎把地图画布的样式搞砸了。有没有办法将某个元素排除在特定框架的样式之外?或者仅仅在地图画布上重置样式,这样它就不会受到twitter引导的样式表的影响

除了twitter引导的样式之外,这里还有一些代码:

<style type="text/css">
      html { height: 100% }
      body{ height: 100%; margin: 0; padding: 0 }
</style>

html{高度:100%}
正文{高度:100%;边距:0;填充:0}

我认为这与他们的加入有关

img{
    max-width: 100%;
}
建议的修复方法是:

#mapContainer img{
    max-width: none;
}
看这里

[更新]

看起来2.0.4的发行版应该可以解决这个问题(我还没有尝试通过change.log来解决这个问题)


我对
引导+谷歌地图
也有同样的问题。我假设您使用的是其他CSS文件(添加在引导后文件中),因此为了在#map容器中包含的图像中“覆盖”该样式,只需在您自己的CSS文件中使用如下代码:

#mapContainer img{
    max-width: none;
}
正如subhaze所说。这对我很有效


希望这对你有所帮助。

你能发布一个这方面的现场演示吗?我已经在Chrome控制台上试用过:$('img').css('max-width','100%”)它似乎没有效果,但我会尝试将其添加到我的代码中。你想要相反的效果,因为他们已经将所有图像设置为
max-width:100%
你需要将其置零<代码>$('img').css({'max-width':'none'})