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
Google Maps 100% Height
提问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 height
for html
and body
tags also:
您还必须设置height
forhtml
和body
标签:
html, body { height: 100%; }
Look at this example.
看看这个例子。