gpt4 book ai didi

html - 谷歌地图停留在左上角

转载 作者:行者123 更新时间:2023-11-28 13:09:56 25 4
gpt4 key购买 nike

我想将 Google map 放在我的页面底部,但无论我插入什么数字,它始终停留在左上角,不会移动。我可以调整它的大小,但我似乎无法移动定位。有什么帮助吗?

HTML:

<iframe 
marginwidth="0" marginheight="0" scrolling="no" width="422" height="300"
frameborder="0" scrolling="no"
src="https://maps.google.ca/maps?ie=UTF8&amp;cid=7805933538308657347&amp;q=Hibiscus&amp;gl=CA&amp;hl=en&amp;t=m&amp;z=16&amp;iwloc=A&amp;output=embed">
</iframe>

CSS:

    .iframe  {
position: absolute;
padding-bottom: 65%;
padding-top: 30px;
overflow: hidden;
top: 8000px;
left: 400px;
width: 100%;
height: 100%;
}

最佳答案

只需将 iframe 放在页面的页脚标记中即可。

HTML

<html>

<body>
stuff...
</body>
<footer>
<iframe style="width:100%; height:100%; position:absolute;"
marginwidth="0" marginheight="0" scrolling="no" width="422" height="300"
frameborder="0" scrolling="no"
src="https://maps.google.ca/maps?ie=UTF8&amp;cid=7805933538308657347&amp;q=Hibiscus&amp;gl=CA&amp;hl=en&amp;t=m&amp;z=16&amp;iwloc=A&amp;output=embed">
</iframe>
</footer>
</html>

CSS

.iframe  {
position: absolute;
padding-bottom: 65%; //65% padding-bottom is massive... are you sure you want that much?
padding-top: 30px;
width: 100%;
height: 100%;
//overflow:hidden; Why that? Doesn't do anything usefull in this situation.
//left:400; Is it supposed to be 400px? If so, your page is pretty huge considering you have a map the size of your page.
}

关于html - 谷歌地图停留在左上角,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15620986/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com