2013-05-11 114 views
1

任何人都可以告訴我錯誤在這個html編碼的位置嗎?圖片地圖不適用於谷歌瀏覽器

https://newmedia.leeds.ac.uk/ug10/cs10jy/portfolio/studenthands/imagemap.html

我已經寫了這個代碼,但我不能似乎看到我在線上尋找和以下教程後去錯了...

<img src ="images/socialnetwork.png" 
width="220" border="0" 
usemap ="#socialmap" /> 

<map id ="socialmap" 
name="socialmap"> 
<area shape ="poly" coords ="77,83,163,127" 
href ="https://www.facebook.com/StudentHands" target="_blank" /> 
<area shape ="poly" coords ="1,105,75,153" 
href ="https://twitter.com/StudentHands" target="_blank" /> 
</map> 

任何幫助將非常感謝!

回答

1
<area shape ="poly" coords ="77,83,163,127" 
href ="https://www.facebook.com/StudentHands" target="_blank" /> 

該座標不形成一個多邊形,它可以只是一條線。 座標取爲「x1,y1,x2,y2,...... xn,yn」,其中n> = 3

+0

或者它應該是'形狀= 「矩形」',也許 – HerrSerker 2014-08-11 08:38:34

0

刪除地圖代碼中的換行符和屬性與=之間的空格。這應該有所幫助。

試試這個

<img src="images/socialnetwork.png" width="220" border="0" usemap="#socialmap" /> 

<map id="socialmap" name="socialmap"> 
<area shape ="poly" coords ="77,83,163,127" href ="https://www.facebook.com/StudentHands" target="_blank" /> 
<area shape ="poly" coords ="1,105,75,153" href ="https://twitter.com/StudentHands" target="_blank" /> 
</map> 
相關問題