【问题标题】:Image Map links not working in IE or Firefox图像地图链接在 IE 或 Firefox 中不起作用
【发布时间】:2014-07-22 20:57:09
【问题描述】:

我可以在此页面上获取图像映射:http://dlibrary.libguides.com/content.php?pid=611371&sid=5051634 在 Chrome 中打开链接,但在 IE 和 Firefox 中无法打开。最初我的图像映射名称没有#,所以我添加了它,但这仍然没有解决问题。我创建了图像映射:http://www.maschek.hu/imagemap/imgmap 代码如下:

    <p><img    src="http://lgimages.s3.amazonaws.com/data/imagemanager/77096/fall_instruction_menu2014.jpg" alt="menu page 1" height="1650" width="1275" usemap="#imgmap201472214596" />
<map id="#imgmap201472214596" name="#imgmap201472214596">
<area shape="rect" alt="Intro to College Research Presentation" title="Intro to College Research Presentation" coords="69,240,511,287" href="http://lgdata.s3-website-us-east-1.amazonaws.com/docs/2717/1161608/Research_for_College.pdf" target="_blank" />
<area shape="rect" alt="Scholarly vs Popular Resources Presentation" title="Scholarly vs Popular Resources Presentation" coords="73,875,605,920" href="http://lgdata.s3-website-us-east-1.amazonaws.com/docs/2717/1161609/Scholarly_vs_Popular.pdf" target="_blank" />
<area shape="rect" alt="Writing Research Questions Presentation" title="Writing Research Questions Presentation" coords="75,1000,541,1062" href="http://lgdata.s3-website-us-east-1.amazonaws.com/docs/2717/1161610/Research_Questions.pdf" target="_blank" />
<area shape="rect" alt="Developing Search Terms Presentation" title="Developing Search Terms Presentation" coords="76,1147,504,1197" href="http://lgdata.s3-website-us-east-1.amazonaws.com/docs/2717/1161611/Developing_Search_Terms.pdf" target="_blank" />
<area shape="rect" alt="Database Search Strategies Presentation" title="Database Search Strategies Presentation" coords="73,1325,535,1373" href="http://lgdata.s3-website-us-east-1.amazonaws.com/docs/2717/1161612/Search_Strategies_for_Databases.pdf" target="_blank" /><!-- Created by Online Image Map Editor (http://www.maschek.hu/imagemap/index) --></map></p><p>
    <img src="http://lgimages.s3.amazonaws.com/data/imagemanager/77096/fall_instruction_menu20142.jpg" alt="menu page 2" height="1650" width="1275" usemap="#imgmap2014722155240"/>
<map id="#imgmap2014722155240" name="#imgmap2014722155240">
<area shape="rect" alt="Ultimate Research Combo Presentation" title="Ultimate Research Combo Presentation" coords="72,725,854,812" href="http://lgdata.s3-website-us-east-1.amazonaws.com/docs/2717/1161613/Ultimate_Research_Combo.pdf" target="_blank" /><!-- Created by Online Image Map Editor (http://www.maschek.hu/imagemap/index) --></map></p>

是什么阻止了链接在 IE 和 Firefox 中打开?

【问题讨论】:

    标签: html internet-explorer firefox imagemap


    【解决方案1】:

    &lt;image /&gt; 标签中,这是正确的:usemap="#imgmap201472214596"

    usemap 是对不带标签的&lt;map /&gt;name 的引用:

    <map id="imgmap201472214596" name="imgmap201472214596">
                                       ^----------
    

    我很确定当您删除 # 并确保所有标签都正确写入并且所有引号都完好无损时,它会起作用。

    【讨论】:

    • 是的!就是这样!太感谢了。我知道这是我没有注意到的愚蠢行为。感谢您的帮助!
    • 没问题 :-) 我承认,这可能令人困惑,为什么他们想要 usemap 中的 #
    猜你喜欢
    • 2018-04-26
    • 2013-04-25
    • 2012-02-19
    • 2014-11-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多