<area shape= "rect" > 标签的 "coords" 属性不是 "left,top,right,bottom" 格式。Firefox 中的错误



当我尝试在Firefox中运行代码时,遇到了这个错误。它在IE中运行良好。实际上,我正试图通过定义图像映射来实现图像上的滚动效果

<map name="planetmap"> 
    <area class="a1" shape="rect" coords="420,120,380,100" alt="Ring" href="#"/> 
    <area class="a2" shape="rect" coords="300,330,400,250" alt="Ring" href="#"/> 
    <area class="a3" shape="rect" coords="610,190,580,270" alt="Ring" href="#"/> 
    <area class="a4" shape="rect" coords="450,250,550,400" alt="Ring" href="#"/>
</map>

请帮我解决这个问题,当我鼠标悬停在图片上时,Firefox中没有打开任何东西。

查看错误。"左上右下":在图像地图坐标系中,"0,0"为左上角。因此,第一个值必须小于第三个值,第二个值必须大于第四个值。

<area class="a1" shape="rect" coords="420,120,380,100" alt="Ring" href="#"/>
<area class="a2" shape="rect" coords="300,330,400,250" alt="Ring" href="#"/>
<area class="a3" shape="rect" coords="610,190,580,270" alt="Ring" href="#"/>
<area class="a4" shape="rect" coords="450,250,550,400" alt="Ring" href="#"/>

在第一个中,380<420和100<两者都错了。在第二个中,250<330在第三个中,580<610第四个看起来是正确的。

四个区域中有三个区域的编号无效,并且通常彼此不一致。

最新更新