http://coding.pressbin.com/18/Display-a-Google-Map-when-you-hover-over-location-text/我正在關注如何在文本上顯示Google地圖的本教程。是的,但它出現在一個錯誤的地方。看,地圖顯示在頁面的底部。當我懸停地圖圖片時,div本身沒有與工作區相比的屬性。在懸停鏈接或文本上顯示谷歌地圖
工作代碼:
<div style="position: absolute; left: 678px; top: 170px; z-index: 999; display: none; padding: 1px; margin-left: 5px; background-color: rgb(51, 51, 51); width: 302px; box-shadow: 0pt 1px 10px rgba(0, 0, 0, 0.5);">
<a target="new" href="http://maps.google.com/maps?q=Brookhaven, PA&z=11">
<img border="0" src="http://maps.google.com/maps/api/staticmap?center=Brookhaven, PA&zoom=12&size=300x300&sensor=false&format=png&markers=color:blue|Brookhaven, PA">
</a>
</div>
是什麼在我的瀏覽器:
<div style="display: none;">
<a target="new" href="http://maps.google.com/maps?q=4417 Edgmont Avenue, 19015&z=11">
<img border="0" src="http://maps.google.com/maps/api/staticmap?center=4417 Edgmont Avenue, 19015&zoom=16&size=300x300&sensor=false&format=png&markers=color:blue|4417 Edgmont Avenue, 19015">
</a>
</div>
我失去了對DIV部分。 請幫忙!
在他的網站上的教程示例中,他沒有將鼠標監聽器添加到代碼中,但是,我發現我t在完整的代碼中。 –
這次完美的作品。非常感謝! – woninana