gpt4 book ai didi

jquery - 完全适合初学者使用 Maphilight?

转载 作者:行者123 更新时间:2023-12-01 04:52:51 25 4
gpt4 key购买 nike

我正在尝试使用一个名为maphilight 的jquery 插件。我对使用 jquery 插件完全陌生。我对其他网页设计编码有相当多的经验,甚至对 javascript 有一点经验,但实际上尝试像这样实际使用它......这是第一次。

我就是无法让这个插件工作。在我的 map 上,不同的区域可以正确点击并用作链接,但它们不会突出显示。我能做的最好的事情就是在页面的不同部分显示不正确的突出显示。

我查看了maphighlight网站并看到了他的示例,但我看不到如何使用代码示例的可靠信息。

在我的页面顶部附近,我有:

<script type="text/javascript" src="script/jquery.js"></script>
<script type="text/javascript" src="script/maphilight.js"></script>
<script type="text/javascript">
$(function () {
$('.mapHiLight').maphilight({ stroke: false, fillColor: '009DDF', fillOpacity: 1 });
});
</script>

然后是 map

<img src="image/japan.svg" width="570" height="750" usemap="#nihon">
<map name="nihon">
<area id="test3" href="http://www.tokyo.com" shape="poly" coords="407.963,498.081 403.323,498.08 407.963,498.081 400.819,498.908 387.434,499.66 388.25,496.5
381.4,492.742 381.742,489.948 381.742,489.948 382.811,488.967 385.754,488.459 395.005,491.437 412.248,488.907 412.049,492.742" alt="tests" title="testerhi">
</map>

这里可能出了什么问题?我该怎么办?

抱歉,我在这里这么无知。我希望我错过了一些简单的事情。

最佳答案

您应该为您的图像指定mapHiLight类。
以下是 maphilight 的示例演示。

示例演示在这里:Fiddle

关于jquery - 完全适合初学者使用 Maphilight?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17613729/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com