【发布时间】:2019-08-05 05:32:42
【问题描述】:
我想以半透明的方式显示谷歌地图 API 信息窗口。 因为我为了显示带有许多数据的大型信息窗口。 在 infoWindow 地图的图像隐藏下。 但我无法通过 InforWindow 的 boxClass 属性应用透明(CSS 不透明度)。
请提出解决方案,如何解决这个问题?
非常感谢。
[我的代码]
var infowindow = new google.maps.InfoWindow({
// content from custom function with many datas i made //
content: infowincontentHTMLDoor(nmfacil, lat, lon, addrfacil),
maxWidth: 720,
boxClass: "infowinclass" // ?????????
});
infowindow.open(map, marker);
<style type="text/css">
.infowinclass {
opacity: 0.5;
}
</style>
【问题讨论】:
-
boxClass?你在哪里看到的? developers.google.com/maps/documentation/javascript/reference/… -
感谢您的提问。我想念编码。并通过 DOM 选择器应用另一个 CSS,我的问题解决了。
标签: css google-maps google-maps-api-3