【发布时间】:2014-01-10 22:46:01
【问题描述】:
正如您在this link 上看到的,在页面底部有一个包含谷歌地图的 div。我想在谷歌地图区域内放置一个红色的 DIV(.blocktest)。问题是红色 DIV 不可见,尽管它的 z-index 高于地图(它可能在地图后面)。问题是什么?谢谢
HTML:
<div id="fullcontainer"></div>
<div id="map"><div id="map-canvas"><div class="blocktest">div that should be above the map</div></div></div>
风格:
#fullcontainer {
margin-bottom:300px;
position:relative;
z-index:2000;
background: #F2F2F2;
}
.blocktest {
width: 60%;
background: red;
z-index: 30;
position: absolute;
left: 20px;
bottom: 56px;
}
#map {
position:fixed;
z-index:1;
height:400px;
bottom:0;
width:100%;
}
#map, #map-canvas {
width: 100%;
height: 400px;
float: left
}
【问题讨论】:
标签: html css google-maps-api-3