【问题标题】:Problem with Firefox & IE8 not showing mouseover alt text for image mapsFirefox 和 IE8 不显示图像映射的鼠标悬停替代文本的问题
【发布时间】:2010-12-03 07:48:26
【问题描述】:

我有以下 HTML:

<div style="position: relative; text-align: left;">
<img id="chart_6c544b37_ac9d_49ed_912e_5ff8ad6c0181_BaseImage" src="chart.gif" width="460px" height="240px" usemap="#chart_6c544b37_ac9d_49ed_912e_5ff8ad6c0181" border="0">

<map name="chart_6c544b37_ac9d_49ed_912e_5ff8ad6c0181">
<area shape="poly" alt="Second Dot" coords="256,51,259,48,256,45,253,48"></area>
<area shape="poly" alt="First Dot" coords="183,51,186,48,183,45,180,48"></area>
</map>
</div>

当我在使用 IE7 时将鼠标悬停在图表上的区域上时,Alt 文本(“第一个点”和“第二个点”)正确显示为工具提示,但在使用 Firefox 或 IE8 时它们不显示。

有什么想法吗?

The example can be seen here

【问题讨论】:

    标签: html map tooltip mouseover


    【解决方案1】:

    属性alt仅在图片无法加载时显示。请改用title 属性。

    【讨论】:

    • 如果标题不存在,某些浏览器会使用 alt 标签 - 这就是您看到所见内容的原因
    猜你喜欢
    • 1970-01-01
    • 2011-04-25
    • 1970-01-01
    • 1970-01-01
    • 2019-12-27
    • 2023-04-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多