首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Imagemap链接不工作

Imagemap链接不工作
EN

Stack Overflow用户
提问于 2016-02-23 14:46:10
回答 1查看 68关注 0票数 0

我使用这个生成器创建了一个图像地图:http://imagemap-generator.dariodomi.de/

...but每个图标上的链接都不工作。我不知道为什么。您可以在这个未完成的站点的主页上看到地图:

http://staging.pixiechildcare.co.uk/index.php

代码语言:javascript
复制
      <img src="img/map-lg.jpg" alt="" usemap="#Map" />
      <map name="Map" id="Map">
          <area id="tree" class="shape" alt="dfgdf" title="dfgdgf" href="http://staging.pixiechildcare.co.uk/index.php" shape="poly" coords="89,47,146,43,189,73,205,121,165,149,114,143,95,106" />

          <area id="cloud" class="shape" alt="" title="" href="http://staging.pixiechildcare.co.uk/index.php" shape="poly" coords="610,41,654,62,665,104,648,146,614,175,558,127,565,64" />

          <area id="splat" class="shape" alt="" title="" href="http://staging.pixiechildcare.co.uk/index.php" shape="poly" coords="915,175,958,202,969,229,958,261,913,305,861,244,873,191" />

          <area id="ladybird" class="shape" alt="" title="" href="http://staging.pixiechildcare.co.uk/index.php" shape="poly" coords="1120,110,1160,130,1172,156,1167,188,1116,241,1066,192,1073,129" />

          <area id="ball" class="shape" alt="" title="" href="http://staging.pixiechildcare.co.uk/index.php" shape="poly" coords="1128,359,1169,377,1182,414,1174,442,1127,488,1083,453,1078,380" />

          <area id="music" class="shape" alt="" title="" href="http://staging.pixiechildcare.co.uk/index.php" shape="poly" coords="730,362,772,378,786,411,779,445,738,491,681,433,683,390" />

          <area id="umbrella" class="shape" alt="" title="" href="http://staging.pixiechildcare.co.uk/index.php" shape="poly" coords="519,228,549,237,572,275,568,314,519,363,465,308,480,248" />

          <area id="train" class="shape" alt="" title="" href="http://staging.pixiechildcare.co.uk/index.php" shape="poly" coords="308,284,344,308,358,347,353,375,306,426,258,370,270,305" />
      </map>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-02-23 14:52:58

在“custom.js”中,当单击具有类shape的元素时,将显式地阻止任何操作。

代码语言:javascript
复制
$(".shape").click(function(){
    event.preventDefault();
});

把它移开它就能工作了..。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35580550

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档