【发布时间】:2017-06-19 19:02:45
【问题描述】:
我错过了什么?我正在使用David Lynch maphilight 插件,并且一直在将我的代码与此页面进行比较以进行故障排除,但两天后,我仍然遇到问题。当我将鼠标悬停在(甚至单击)映射图像的任何部分时,颜色不会显示。链接按预期工作。
我的脚本调用是:
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script type="text/javascript" src="jquery.maphilight.js"></script>
<script type="text/javascript">$(function() {
$('.AMGCmap1').maphilight();
</script>
</head>
而img和map的代码是:
<div>
<img class ="map" id ="AMGCmap1" src="Images\AMGC Logo Big.png" alt="AMGC Logo" usemap="#AGMCmap" border="15">
<map name="AGMCmap">
<area shape="poly" coords="61,432, 58,346, 71,285, 148,287, 164,345, 166,432" href="news.html" title= "News" data-maphilight='{"strokeColor":"0000ff","strokeWidth":5,"fillColor":"ff0000","fillOpacity":0.6}' >
</map>
</div>
我尝试在函数中使用 img ID 和“'.map'”,但没有发现任何区别。其他人有这样的问题吗?
我目前正在使用 Chrome,如果这有帮助的话。
【问题讨论】:
标签: javascript jquery html css maphilight