请问我们如何将地图 div 设置为其容器的 height: 100% ?
我已经在引导模板内容部分中尝试过此操作,但我得到的只是 0px 的高度。甚至 Google-Dev 工具也将 #map 高度显示为 0px。
body {
padding: 0;
margin: 0;
}
html, body, #map {
height: 100%;
}
Set
#map{
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
并给出它的容器position: relative
.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)