【问题标题】:Image map support in firefox, chrome and other browsersfirefox、chrome等浏览器中的图像映射支持
【发布时间】:2013-04-26 21:45:02
【问题描述】:

chrome 和 firefox 是否支持图像映射? w3schools seems to suggest they are

鉴于此,为什么下面的 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>

【问题讨论】:

  • 绝对支持图像映射。图片的尺寸是多少?

标签: html firefox google-chrome standards


【解决方案1】:

尝试将&lt;map id="mainImageMap"&gt; 更改为&lt;map name="mainImageMap"&gt;。如果需要,您可以保留 id,但只需确保有 nameattribute`。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-04-11
    • 2011-08-04
    • 1970-01-01
    • 2021-08-09
    • 1970-01-01
    • 2015-02-26
    • 1970-01-01
    • 2019-06-11
    相关资源
    最近更新 更多