2013-05-11 116 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> 
相关问题