创建图形映射
<img src="planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.htm">
<area shape="circle" coords="90,58,3" alt="Mercury" href="mercur.htm">
<area shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>
shape属性:指的是点击区域的形状,coords指的是链接区域在图片中的坐标(单位为像素)
1.矩形
<area shape="rect" coords="x1,y1,x2,y2" href="url">
<!--左上顶点坐标(x1,y1),右下顶点坐标为(x2,y2)-->
2.圆形
<area shape="circle" coords="x1,y1,r" href="url">
<!--圆心坐标为(x1,y1),半径为r-->
3.多边形 ps:顶点坐标分别为(x1,y1)(x2,y2)…
<area shape="poly" coords="x1,y1,x2,y2......" href="url">
<!--顶点坐标分别为(x1,y1)(x2,y2)......-->