2011-04-03 98 views
8

Chrome和Firefox支持圖像映射嗎? w3schools seems to suggest they areFirefox,Chrome和其他瀏覽器中的圖像映射支持

鑑於此,爲什麼以下HTML會失敗? (顯示圖片,但沒有聯繫工作 - 它在IE瀏覽器正常工作)

<img src="Images/backgroundFinal.png" usemap="#mainImageMap" alt="MainBackground" style="border: none;" /> 
      <map id="mainImageMap"> 
       <area shape="rect" alt="Home Page" title="Home Page" coords="309,198,413,223" href="Default.aspx" target="" /> 
       <area shape="rect" alt="About me" title="About me" coords="245,334,319,353" href="About.aspx" target="" /> 
       <area shape="rect" alt="Gallery" title="Gallery" coords="437,271,497,300" href="Gallery.aspx" target="" /> 
       <area shape="rect" alt="Tattoo" title="Tattoo" coords="249,478,307,503" href="Tattoo.aspx" target="" /> 
       <area shape="rect" alt="Contacts" title="Contacts" coords="395,521,464,544" href="Contact.aspx" target="" /> 
      </map> 
+0

圖像地圖絕對支持。圖像的尺寸是什麼? – Marcel 2011-04-03 04:05:24

回答

22

嘗試改變<map id="mainImageMap"><map name="mainImageMap">。如果需要,您可以保留id,但確保name屬性存在。

相關問題