How to float a div over Google Maps?

前端 未结 4 894
迷失自我
迷失自我 2020-12-02 06:08

I have a div that displays a Google map.

How do I make another div float over the map div?

4条回答
  •  时光取名叫无心
    2020-12-02 06:44

    Just set the position of the div and you may have to set the z-index.

    ex.

    div#map-div {
        position: absolute;
        left: 10px;
        top: 10px;
    }
    div#cover-div {
        position:absolute;
        left:10px;
        top: 10px;
        z-index:3;
    }
    

提交回复
热议问题