有没有一种性感的方式来获取带有 Google map 的网页(全屏),并且只有顶部的小 div#header 和中间的小 div#container?
我做了一些研究,发现了这个例子:http://koti.mbnet.fi/ojalesa/exam/index.html ... 但这并不是我想要做的。
如果您有一个不错的网站示例的精简代码示例,这将对我有很大帮助。
非常感谢。
最佳答案
您可以使用 position: absolute
或 position: fixed
将 HTML 元素随机放置在(基于 HTML 的)Google map 之上。您只需为它们提供一个高于 Google map 中任何元素的 z-index
。
未经测试,但按照这些思路应该可以工作:
<style type="text/css">
.Overlay { position: absolute; left: 0px; top: 0px;
right: 0px; height: 50px; background-color: white; z-index: 100 }
</style>
... Fullscreen Google Map (or whatever).....
<div class="Overlay">I'm on top of a Google Map!</div>
关于html - 谷歌地图作为背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2594946/