| 内容 | map标签定义一个客户端图像映射。图像映射(image-map)指带有可点击区域的一幅图像,下面为大家介绍下map标签的使用,感兴趣的朋友可以了解下
 map标签必须成对出现,即
 <map> ....</map>
 同时map必须和area配合使用。
 img标签里的usermap属性值必须与map标签里的id和name值完全一致
 area标签:定义图片的点击区域 area 是单标签,不成对。
 属性:
 accesskey 快捷键
 alt 图片提示文字
 coords 定义和点击区域的图形的坐标
 href 链接地址
 nohref 图像点击可排除的区域,当不是有href时,需要使用nohref
 shape 可点击区域的形状
 tabindex tab键遍历
 target 链接目标
 代码实例:
 代码如下:
 <img src="images/logo.gif" usermap="#map"/>
 <map id="map" name="map">
 <area shape="rect" coords="a,b,c,d" target="_blank" href=""/>
 <!-- a,b,c,d分别是矩形的左上角和右下角的坐标值 !>
 <area shape="circle" coords="a,b" target="_blank" href="" />
 <!-- a,b分别是圆形的圆心的坐标值 !>
 <area shape="poly" coords="a,b..." target="_blank" href="" />
 <!-- a,b分别是多边形的各个定点的坐标值 !>
 </map>
 
 |