对齐Google Maps iFrame

奥利弗·粉笔

我有一个问题,将左右边距都设置为auto不能对齐我的iFrame,并且我无法设法对齐另一种方式。但是,将其浮动到右侧也可以设置像素边距。

这是iFrame的代码行:

<div id="googlemaps">

    <iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3320.231282230306!2d151.307011!3d-33.67707499999999!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x6b0d54a318442175%3A0x20077e99e79db860!2sTex+Mex+Restaurant+-+Mona+Vale!5e0!3m2!1sen!2sau!4v1432343110125" width="600" height="450" frameborder="0" style="border:0"></iframe>

    </div>

我在CSS中尝试了以下方法:

iframe {
align-items: center;
}


iframe {
    margin-left: auto;
    margin-right: auto;
}

任何答案将不胜感激!

阿隆·艾坦(Alon Eitan)

您需要向iframe添加以下样式: display:block

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

对齐Google Maps iFrame

来自分类Dev

为Google Maps iframe设置语言

来自分类Dev

通过iframe嵌入时google maps错误

来自分类Dev

Google Maps iframe缩放不起作用

来自分类Dev

Google Maps API会在iframe地图上获取地名文字

来自分类Dev

Google Maps iframe未显示掉落的图钉居中

来自分类Dev

Google Maps iframe禁用移动设备上的滚动触摸

来自分类Dev

阻止Google Maps iframe捕获鼠标的滚轮行为

来自分类Dev

Google Maps iframe在移动设备上没有圆形边框

来自分类Dev

react-google-maps 水平对齐 MarkerWithLabel

来自分类Dev

如何将Google Maps网址转换为iframe友好网址

来自分类Dev

将地名和地址转换为Google Maps URL和iFrame

来自分类Dev

宏伟的弹出式窗口-必须在iframe中使用Google Maps Embed API

来自分类Dev

Google Maps iframe无法正确显示,且Bootstrap Collapse面板合拢

来自分类Dev

如何为嵌入的Google Maps创建六边形iFrame?

来自分类Dev

Google Maps <iframe>代码无法从wp文本编辑器正确显示

来自分类Dev

无法通过 google javascript maps api 获取地图,不会引发错误,但 iframe src 是 about:blank

来自分类Dev

如何在 Google Maps iframe 嵌入中获得偏移量

来自分类Dev

在Google Maps信息窗口中将2 DIV彼此对齐

来自分类Dev

如何垂直对齐<iframe>?

来自分类Dev

如何水平对齐iframe(Google地图)的内容?常用方法不起作用

来自分类Dev

使用svg标记时缩放期间的Google Maps标记对齐问题

来自分类Dev

突破Google Form iFrame

来自分类Dev

iOS与Google Maps

来自分类Dev

Android Google Maps LocationClient

来自分类Dev

google maps with ionic

来自分类Dev

Google Maps回归原点

来自分类Dev

Google Maps的AngularJS路由

来自分类Dev

Google Maps API RefererNotAllowedError

Related 相关文章

热门标签

归档