火狐、谷歌和其他浏览器中的图像地图支持

8
图片地图在Chrome和Firefox中是否支持?w3schools似乎表明它们是支持的
鉴于此,为什么以下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>

图像映射是被支持的。图片的尺寸是多少? - Marcel
1个回答

23
尝试将<map id="mainImageMap">更改为<map name="mainImageMap">。如果需要,可以保留id,但请确保存在name属性。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接