html - 使用 z-index:-1 时谷歌地图不活动
问题描述
我想在执行 z-index 时解决 Google Map 中的问题:-1 不激活地图,但 div 如我所愿在地图上方...我想激活地图,且 div 仍然在地图上方
<div id="map" style="z-index: -1;"></div>
<div id="filter-div-for-sale-mobile" style="transform-origin: left 78.5px;top: 39px;left: -273.61px;width:360.5px;" class="zsg-popover_arrow-up zsg-popover-adjustable popover-thick-top popover-no-close popover-visible filter-button-popover listing-type-popover">
解决方案
I would recommend using the iframe option provided by Google as it is much more controllable in regards to the CSS styling perspective of making it responsive on a page.
Sample of what I mean. (the width and height for the iframe attribute aren't required)
<iframe width="600" height="450" frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/view?zoom=10¢er=51.5074%2C-0.1278&key=..." allowfullscreen></iframe>
推荐阅读
- amazon-web-services - DynamoDB 多个过滤条件,给出错误 - buildTree 错误:未设置参数:ConditionBuilder
- mysql - 计算累计输赢百分比
- c# - jQuery dataTables:基于字符串的过滤器
- c++ - 如何创建一个删除 C 字符串中所有选定字符的函数?
- javascript - 如果原始表单对于屏幕阅读器来说过于复杂,是否提供备用表单以符合 WCAG 合规性?
- c# - 使用 dotcore api 在单页应用程序上联合注销
- angular - 下拉更改 - 数据显示 [object object]
- android - 构建发布 APK 时的 Android Gradle 插件警告
- java - 如何覆盖文本文件特定部分的整数?
- python - 有条件的减少