问题是,在Safari 13上,某些元素未按实现的顺序(z索引)显示。但是,该元素将按预期运行,因此缩放有效(如果知道位置),但是控件不可见。这在其他设备上正常运行,例如Mac或ios12上的Safari 13,...
heremap是Ionic home.page的元素,并且包含here-map组件。此处地图组件会初始化MapControlElements。
已经尝试将z-index设置为here-map,例如90,然后将MapSettingsControl设置为99。但是,它始终保持在顶部。试图在CSS中进行设置,addClass并直接设置MapControlSetting的HTML元素。我试图添加一个自定义控件并添加CSS类。到目前为止没有运气。
**HTML component**
<div #map class="map" style="width: 100%; height: 100%;">
**CSS component**
.map {
position: absolute;
z-index: 10;
background-color:primary
}
.btnOnTop {
position: absolute;
z-index: 99; /* Make sure it does not overlap */
}
**here-component**
@ViewChild("map",{static: true})public mapelement: ElementRef;
this.mapUI.getcontrol("mapsettings").addClass("btnOnTop");
or
this.mapUI.getElement().style.zIndex = 999;
我想让Control元素以给定的对齐方式可见,例如右下角,但是在Safari和Safari 13上的Chrome上,它消失了。