我做了一个图像地图,它不工作在Firefox.它在Chrome和Safari中都可以正常工作.
这是网站
bryanedwardcollins.com
请帮忙!
<MAP NAME="menumap" > <AREA HREF="contact.html" ALT="contact" SHAPE="POLY" COORDS="425,100,572,89,594,142,488,150,460,166,423,100"> <AREA HREF="insameit.html" ALT="insame i.t." SHAPE="POLY" COORDS="382,239,462,245,461,343,608,344,610,395,354,405,341"> <AREA HREF="floorpart.html" ALT="floor part" SHAPE="POLY" COORDS="307,185,429,430,221,379,222,374,235,283,224"> <AREA HREF="IoUse.html" ALT="I O Use" SHAPE="POLY" COORDS="27,18,231,16,243,382,253,265,69,252,193,73,27,73"> <AREA HREF="worldpart.html" ALT="world part" SHAPE="POLY" COORDS="25,303,122,305,448,449"> </MAP>
解决方法
我也陷入了这个问题.看来,Chrome将解析img属性usemap =“mapName”而不使用#符号.但是,如果不包含哈希符号’#’,则映射将不会与FireFox和Internet Explorer上的映像关联.
这是正确的方法:
<img src="images/header.jpg" id="hdr" name="hdr" usemap="#hdrMap" alt="alt string here" border="0"> <map name="hdrMap" style="cursor:pointer;"> <area shape="rect" coords="720,65,880,0" href="http://www.thisisthefirstlink.com" target="_blank" alt="first link alt"> <area shape="rect" coords="882,1024,0" href="http://www.secondlink.com" target="_blank" alt="second link alt"> </map>
请注意usemap =“#hrdMap”具有哈希标记符号,并匹配map标签的name =“hdrMap”属性.这似乎有点混乱,因为很多人将#符号与引用id属性相关联.
希望这可以帮助