<img src="img/planets.gif" width="145" height="126" usemap="#planetmap" />
<map name="#planetmap">
<!--
作者:offline
时间:2022-09-07
描述:map标签
HTML <map> 标签用于客户端图像映射,图像映射指带有可点击区域的一幅图像。<map> 标签支持全局属性,并且支持标签支持所有HTML事件属性
-->
把图片放在做坐标轴上,所以左上角顶点坐标为(x,y=0,0)右上角顶点坐标为(x,y=width,0)左下角顶点坐标为(x,y=0,height)右下角顶点坐标为(x,y=width,height)
<!-- 1、矩形:(左上角顶点坐标为(x1,y1),右下角顶点坐标为(x2,y2)) -->
<area shape="rect" coords="0,0,82,126" href="HtmlTest/sun.html"/>
<!-- 2、圆形:(圆心坐标为(X1,y1),半径为r) -->
<area shape="circle" coords="90,58,3" href="HtmlTest/merglobe.html"/>
<!-- 3、多边形:(各顶点坐标依次为(x1,y1)、(x2,y2)、(x3,y3) ......) -->
<area shape="poly" coords="0,0,70,0,70,70,82,126" href="HtmlTest/venus.html"/>
</map>
html 图片映射,新手笔记
最新推荐文章于 2023-05-08 21:20:06 发布