图像映射适用于Internet Explorer,但不适用于Chrome

时间:2017-08-09 00:37:32

标签: javascript html5 google-chrome firefox internet-explorer-11

我已使用以下代码设置了包含图像映射的页面。映射在Internet Explorer 10,11,Edge和FireFox中有效,但在Chrome中不起作用。知道我错过了什么吗?

MATCH (d:Domain {name: 'random.com'})<-[:IN]-(p:Person)
RETURN p;

1 个答案:

答案 0 :(得分:0)

您的ID不匹配。您在图片元素中引用#map,但地图的ID为Map。标识符区分大小写。

修复ID后,Chrome中的工作正常:

<center><img src="http://via.placeholder.com/1024x768" usemap="#map"></center>
<map id="map" name="map">
<area shape="rect" coords="530,50,650,100" href="live view.html" target="_self" />
<area shape="rect" coords="662,58,821,118" href="Setup.html" target="_self" />
<area shape="rect" coords="315,550,370,520" href="1x1.html" target="_self" />
<area shape="rect" coords="390,550,445,520" href="2x2.html" target="_self" />
<area shape="rect" coords="455,550,505,520" href="3x3.html" target="_self" />
<area shape="rect" coords="525,550,650,520" href="fullscreen.html" target="_self" />    
</map>