谷歌地图作为foursquare上的固定背景

war*_*nds 3 html css google-maps foursquare

我试图做类似这样.我希望谷歌地图作为固定的背景,并将我的内容(一些文字)放在它上面,因为它是在foursquare上制作的.此外,我希望能够滚动我的内容.这是我的努力:

#map
{
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 0;
}
#content
{
    width: 200px;
    margin: auto;
    position: relative;
    z-index: 1;
    border: 4px solid black;
}
?
Run Code Online (Sandbox Code Playgroud)

但地图消失了.任何帮助将不胜感激.

Bil*_*oat 9

这是你可以做到的一种方式:http://jsfiddle.net/X5r8r/927/

html, body {
    height:100%;
}

#map-container {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
}

#map
{
    width: 100%;
    height: 100%;
}
#content
{
    width: 200px;
    position: absolute;
    z-index: 1;
    top:0;
    left:0;
    border: 4px solid black;
    background:#fff;
    padding:20px;
}
Run Code Online (Sandbox Code Playgroud)