前端-HTML关于图片插入的映射问题
例子:当点击同一张图片的不同位置时出现不同的效果。
主要代码如下:
<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指分别指左上坐标(x1,y1),右下坐标(x2,y2)
或者圆形,coords指,圆心坐标(c1,c2)及圆半径r的值。