1

我已經使用下面的代碼設置了一個包含圖像映射的頁面。該映射適用於Internet Explorer 10,11,Edge和FireFox,但在Chrome中無法使用。任何想法我失蹤?圖像地圖在Internet Explorer中可用,但不適用於Chrome

<center><img src="Live View.png" width="1024" height="768" border="0" 
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> 

回答

0

您的ID不符。您在圖片元素中引用#map,但您的地圖ID爲Map。標識符區分大小寫。

事情在Chrome做工精細固定的ID後:

<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>

+0

哦,我的上帝,我是個白癡。非常感謝! –

相關問題