HTML map name 屬性
實例
帶有可點擊區域的圖像映射:
<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>
<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>
嘗試一下»
瀏覽器支持
所有主流瀏覽器都支持name 屬性。
定義和用法
name 屬性是必需的,規定圖像映射的名稱。
name 屬性與<img> 標籤的usemap 屬性相關聯,以創建圖像與映射之間的關係。
HTML 4.01 與HTML5之間的差異
無。
語法
<map name="mapname">
屬性值
值 | 描述 |
---|---|
mapname | 图像映射的名称。 |
HTML <map>標籤