我正在自定义一个Cesium地图,该地图的内部具有各种信息,这是我使用bootsrap实现的叠加的样式,不幸的是,我放置的div保持在特定位置,而忽略了其大小的调整这页纸。有没有办法使添加到铯查看器的DIV响应?
我现在要做的是
var position = Cesium.Cartesian3.fromDegrees(-76.59777, 39.03883);
var scratch = new Cesium.Cartesian2();
var canvasPosition = viewer.scene.cartesianToCanvasCoordinates(position, scratch);
viewer.scene.preRender.addEventListener(function () {
if (Cesium.defined(canvasPosition)) {
htmlOverlayBoxInfo.style.left = '600px';
htmlOverlayBoxInfo.style.top = '180px';
}
});
<div id="box-info" style="position: absolute" class="circles push-50 visibility">
<div class="visibility-hidden" data-toggle="appear" data-class="animated fadeIn">
<span class="circle circle-0"></span>
</div>
<div class="visibility-hidden" data-toggle="appear" data-class="animated fadeIn" data-timeout="100">
<span class="circle circle-1"></span>
</div>
<div class="visibility-hidden" data-toggle="appear" data-class="animated fadeIn" data-timeout="200">
<span class="circle circle-2"></span>
</div>
<div class="visibility-hidden" data-toggle="appear" data-class="animated fadeIn" data-timeout="300">
<span class="circle circle-3"></span>
</div>
<div class="visibility-hidden " data-toggle="appear" data-class="animated fadeIn" data-timeout="400">
<span class="circle circle-4"></span>
</div>
<div class="visibility-hidden" data-toggle="appear" data-class="animated fadeIn" data-timeout="500">
<span class="circle circle-5"></span>
</div>
<div class="visibility-hidden" data-toggle="appear" data-class="animated fadeIn" data-timeout="600">
<span class="circle circle-6"></span>
</div>
<span class="circle circles-main-content visibility-hidden" data-toggle="appear"
data-class="animated fadeIn" data-timeout="100">
<h4>
New </h4>
</span>
</div>
我被迫放置[style =“ position:absolute”],否则我需要覆盖地图的div根本不会显示。我在做什么错了?