删除谷歌地图下方的空白区域(插入iframe)[重复]

问题描述 投票:2回答:3

这个问题在这里已有答案:

我使用iframe在我的网站中插入了谷歌地图。

问题是地图下面有一个“白色空间”。

我已经尝试过了:

padding: 0 !important;
margin: 0 !important;

但没有工作。我该如何删除它?

这是真正的网站(只是一个底部):http://jurisglobal.es/

enter image description here

css google-maps
3个回答
7
投票

试试这个

make line-height:0;对于iframe的父div。

.et_pb_text_inner {
    line-height: 0; 
}

0
投票

您可以将其添加到css文件以删除空间

.et_pb_text_inner iframe{float:left}

0
投票

删除该空格有两种方法。

首先,您可以将float值设置为leftright

iframe {
   float: right;
      // or
   float: left;
}

这在您的网站上看起来相同,因为您已将iframe max-height设置为100%

iframe {
   max-height: 100%;
}

float = left:float: left;

float = right:enter image description here其次,你可以将围绕div iframeline-height设置为0

.et_pb_row_5 .et_pb_row {
   line-height: 0;
}

enter image description here

希望这些信息可以帮到你。

© www.soinside.com 2019 - 2024. All rights reserved.