gpt4 book ai didi

css - 如果 map 的高度较大,街景 View 无法正确显示图像

转载 作者:行者123 更新时间:2023-11-28 18:26:22 27 4
gpt4 key购买 nike

我按照下面的方式使用过街景

/* Map html */
<div id="mapDiv" class="">
<div id="map-holder">
<div id="map_canvas" class="bigmap"></div>
<div id="map_stv" class="minimap" style="display: none"></div>
</div>
</div>

/* Css associated */
.bigmap{
width:100%;
height:100%;
}

.minimap{
width:50%;
height:100%;
}
#map_stv {
position: absolute;
top: 0;
right: 0;
}
#map_stv img {
border: none !important;
max-width: none !important;
}

每当我需要显示街景时,我都会将迷你 map 类添加到 map_canvas 并切换 map_stv。它工作正常。但是本地图的尺寸​​为 768x1024 时,我会遇到以下问题

enter image description here

有没有人遇到过这个?有什么建议吗?

最佳答案

I made a fiddle for you!

问题是,您的 map 对于图像来说拉伸(stretch)得太远,因此街景图像的顶部被截断了。

为了使您的 map 具有响应性,我刚刚添加了:

style="width: 99%; height: 99%;

到你的#map-holder div。

总而言之,我最好的选择是尝试使用 map widthheight 保持或多或少均匀的纵横比

关于css - 如果 map 的高度较大,街景 View 无法正确显示图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15612364/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com