Set Google Maps Container DIV width and height 100%

后端 未结 12 963
遇见更好的自我
遇见更好的自我 2020-11-28 04:45

I loaded Google Maps API v3 and print Google Map in div. But when set width & height to 100% and auto I can\'t see the Map.

Here is HTML code snippe

12条回答
  •  鱼传尺愫
    2020-11-28 05:25

    If that div is the only thing on your page, set:

    body, html {
      height: 100%;
      width: 100%;
    }
    

提交回复
热议问题