教程

html graphics

  • 矩形: (左上角顶点坐标为(x1,y1),右下角顶点坐标为(x2,y2))

    1
    
    <area shape="rect" coords="x1,y1,x2,y2" href=url>
  • 圆形: (圆心坐标为(X1,y1),半径为 r)

    1
    
    <area shape="circle" coords="x1,y1,r" href=url>
  • 多边形: (各顶点坐标依次为(x1,y1)、(x2,y2)、(x3,y3) ……)

    1
    
    <area shape="poly" coords="x1,y1,x2,y2 ......" href=url>
  • 例子:

    1
    2
    3
    4
    5
    6
    7
    8
    
    <img src="planets.gif" width="145" height="126" alt="Planets"
         usemap="#planetmap">
    
    <map name="planetmap">
      <area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun">
      <area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury">
      <area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">
    </map>