【问题标题】:How to remove google maps header?如何删除谷歌地图标题?
【发布时间】:2019-03-12 08:33:49
【问题描述】:

我已经通过谷歌地图创建了我的谷歌地图,我已经嵌入到我的网站,不幸的是它显示了一个我不想显示的标题。

这里L jsfiddle:http://jsfiddle.net/Lmenr28z/

代码如下:

<section class="map">
            <iframe src="https://www.google.com/maps/d/u/1/embed?mid=11YLE4clSoswTweX22iXJALsg-GJkDc7s" width="100%" height="480"></iframe>
    </section>

我尝试使用 css 隐藏

.i4ewOd-pzNkMb-haAclf{
    display: none !important;
}

【问题讨论】:

  • 对了兄弟我改了

标签: css google-maps iframe maps google-maps-markers


【解决方案1】:

我更新了你的小提琴:http://jsfiddle.net/Lmenr28z/2/

这里的问题是您无法访问 iframe 中的元素和样式。简单的技巧是将包装器设置为 overflow:hidden 并将 iframe 向上移动一点以使标题不可见。

section.map {
  width:100%;
  height:100%;
  overflow:hidden;
}
iframe {
  margin-top:-50px;
}

【讨论】:

  • 感谢完美解决方案。
猜你喜欢
  • 2016-09-24
  • 2012-10-17
  • 1970-01-01
  • 2011-01-28
  • 2018-10-13
  • 1970-01-01
  • 1970-01-01
  • 2014-05-29
  • 2020-10-31
相关资源
最近更新 更多