我有一个div作为菜单超过了我的地图。当我触摸地图时,它会“流血”,就像我触摸地图本身一样。我似乎无法找到一个地图属性来解决这个问题。我也无法与顶尖的div进行互动。这就像地图的位置在zIndex: 0
处可见,但它占据了所有可能的索引。科尔多瓦/ Ionic2原生地图:触摸地图上的div ontop“bleeds through”
这里是我的代码:
TS/JS
this.map = new GoogleMap('map', {
'backgroundColor': 'white',
'controls': {
'compass': false,
'myLocationButton': false,
'indoorPicker': false,
'zoom': false
},
'gestures': {
'scroll': true,
'tilt': true,
'rotate': true,
'zoom': true
},
'camera': {
'latLng': location,
'tilt': 30,
'zoom': 15,
'bearing': 50
}
});
HTML
<div id="test"></div>
<div id="map"></div>
CSS
#test
{
position: absolute;
top: 25%;
left: 25%;
height: 50%;
width: 50%;
background: red;
}
#map
{
height: 100%;
}
如果我想让div永远在屏幕上怎么办?它只是部分覆盖屏幕 –