代码拉取完成,页面将自动刷新
带有可点击区域的图像地图:
<img src="../assets/workplace.jpg" alt="Workplace" usemap="#workmap" width="400" height="379">
<map name="workmap">
<area shape="rect" coords="34,44,270,350" alt="Computer" href="computer.htm">
<area shape="rect" coords="290,172,333,250" alt="Phone" href="phone.htm">
<area shape="circle" coords="337,300,44" alt="Cup of coffee" href="coffee.htm">
</map>
<map>
标签用于定义图像映射。 图像地图是具有可点击区域的图像。
<map>
元素的必需名称属性与 <img> 的 usemap 属性相关联,并在图像和地图之间创建关系。
<map>
元素包含许多 <area> 元素,它们定义了图像地图中的可点击区域。
Element | |||||
---|---|---|---|---|---|
<map> | Yes | Yes | Yes | Yes | Yes |
属性 | 值 | 描述 |
---|---|---|
name | mapname | 必需的。 指定图像映射的名称 |
<map>
标签支持 HTML 中的全局属性。
<map>
标签支持 HTML 中的事件属性。
另一个带有可点击区域的图像地图:
<img src="../assets/workplace.jpg" 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>
大多数浏览器将显示具有以下默认值的 <map>
元素:
map {
display: inline;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。