答案 0 :(得分:1)
您必须将 mapDiv 与另一个div包装在一起,制作'wrapper'和'panel' absolute 因此,您的面板可以在地图上方飞行,您可以使用顶部,左侧,底部或右侧设置面板的位置。
wrapperMap:
<div class="wrapperMap">
<div id="mapDiv"></div>
</div>
<div id="fly" class="panel panel-warning">
<div class="panel-heading">
<h3 class="panel-title">Layers Not Found</h3>
</div>
<div class="panel-body">Sorry, I could not list layers!</div>
</div>
CSS:
#fly {
position: absolute;
clear: none;
left: 20%;
}
.wrapperMap {
height: 100%;
width: 100%;
position: absolute;
clear: none;
}
查看此JS Fiddle