html - 如何精确定位谷歌地图控件?

标签 html css google-maps

为了精确定制,我们如何定位谷歌地图控件?

这对于 css 来说似乎很复杂,因为它们没有特定的 ID 或类。

他们都有类(class):

.gmnoprint

最佳答案

使用 :nth-child() selector

左侧控件(箭头、缩放和街景)

 #map .gmnoprint:nth-child(7) {
    //position:absolute; --> default
    top: whatever pt !important;
 }

“ map /卫星”按钮

 #map .gmnoprint:nth-child(8) {
    top: whatever pt !important;
 }

关于html - 如何精确定位谷歌地图控件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13556396/

相关文章:

html - 如何选择不在表头中的具有特定类的html表格单元格

google-maps - 需要传递地址而不是 latlong - Google map v3

html - 视频标签粘贴问题

css - 如何 z-index parent 的背景

javascript - 使用 json_encode 从 php 到 javascript 的数据传输

javascript - Ng2-map/Ng2-ui - Angular2 绘制地理代码的差异

html - 试图居中导航栏

javascript - 如何通过 JavaScript 函数在 HTML5 Canvas 上绘制多边形

javascript - 使用 anchor 标记提交表单

html - 在 css 中为图标使用 sprite 表