javascript 谷歌地图 100% 高度

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8325677/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 03:02:55  来源:igfitidea点击:

Google Maps 100% Height

javascriptjquerycssgoogle-mapsgoogle-maps-api-3

提问by Satch3000

I am using the code from here:

我正在使用这里的代码:

http://jquery-ui-map.googlecode.com/svn/trunk/demos/jquery-mobile-example.html#basic_map

http://jquery-ui-map.googlecode.com/svn/trunk/demos/jquery-mobile-example.html#basic_map

My only problem is that I can't find how to make the map 100% Height.

我唯一的问题是我找不到如何使地图 100% 高度。

Anyone had this problem before?

以前有人遇到过这个问题吗?

回答by TMS

You have to set heightfor htmland bodytags also:

您还必须设置heightforhtmlbody标签:

html, body { height: 100%; }

Look at this example.

看看这个例子