【问题标题】:Image map area poly certain coords Firefox doesn't work, IE works图像地图区域 poly 某些坐标 Firefox 不工作,IE 工作
【发布时间】:2011-09-13 00:36:24
【问题描述】:

图像映射 HTML 有问题。

没有样式且没有 js 的工作示例: http://www.download.lagunawebdesign.pl/bug/

<img src="http://www.download.lagunawebdesign.pl/bug/Bez-nazwy-2.png" width="242" height="347"  alt="Planets" usemap="#planetmap" />

<map id="planetmap" name="planetmap">
    <area shape="poly" coords="31,37,31,68,47,68,47,54,51,54,51,38" title="1" alt="" href="#" />
    <area shape="poly" coords="29,48,23,47,23,42,6,42,6,57,13,58,15,67,31,66,30,49" title="2" alt="" href="#" />
    <area shape="poly" coords="32,99,31,131,46,131,47,117,51,116,51,99" title="3" alt="" href="#" />
    <area shape="poly" coords="32,163,32,196,46,194,46,180,51,180,52,164,31,163,31,196,47,195,46,180,52,180,52,163" title="4" alt="doesnt work" href="#" />
    <area shape="poly" coords="32,227,31,258,47,259,47,245,52,245,52,227" title="5" alt="" href="#" />
    <area shape="poly" coords="121,297,121,316,153,317,153,302,139,301,139,296" title="6" alt="" href="#" />
    <area shape="poly" coords="190,209,191,226,210,227,211,195,195,195,196,209" title="7" alt="" href="#" />
    <area shape="poly" coords="5,17,5,0,51,0,51,18" title="8" alt="" href="#" />
</map>  

只有第四个区域不能正常工作。在 Firefox 或 Opera 上不可点击,Firebug 显示好的区域,但在悬停光标时不会改变(只有靠近右侧区域的非常小的和平是可点击的)。在 IE 上工作正常。 我真的不知道如何解决它。

所有坐标都是客户在 CMS 中输入的,有些坐标不起作用(例如 3/500)。

【问题讨论】:

    标签: html image firefox xhtml map


    【解决方案1】:

    在我看来,第四个区域的坐标太多了。我试过 coords="32,163,31,196,46,194,46,180,51,180,52,164" 它似乎在 Firefox 和 Opera 中对我有用。希望这会有所帮助!

    【讨论】:

      【解决方案2】:

      只需将164,31,163,31 更改为164,31。它看起来几乎相同,但它是有效的。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-11-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-01-26
        • 2013-07-15
        • 1970-01-01
        相关资源
        最近更新 更多