map

 

用途

<map> 元素定义客户端的图像映射。图像映射是带有可点击区域的图像。

例子

代码

<img src="planets.jpg" border="0" usemap="#planetmap" alt="Planets" />
<map name="planetmap" id="planetmap">
  <area shape="circle" coords="180,139,14" href ="venus.html" alt="Venus" />
  <area shape="circle" coords="129,161,10" href ="mercur.html" alt="Mercury" />
  <area shape="rect" coords="0,0,110,260" href ="sun.html" alt="Sun" />
</map>

属性

标准属性

事件属性

变更点

<map>标签在HTML5与HTML4.01之间存在如下差异

  • HTML5有一些新的属性,同时不再支持以下的HTML4.01属性
    1. name
      原用于 map 标签定义唯一的名称。

参考

外部链接