English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
必需的name属性指定图像映射的名称,name属性与 <img>的usemap属性相关联,并在图像和地图之间创建关系。
具有可点击区域的图像地图:
!DOCTYPE html> <html> <head> <title>HTML:<map> name 属性 - 基础教程网(oldtoolbag.com)</title> </head> <body> <p>Click on the sun or on one of the planets to watch it closer:</p> <img src="planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap"> <map name="planetmap"> <area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.html"> <area shape="circle" coords="90,,58,3" alt="Mercury" href="mercur.html"> <area shape="circle" coords="124,58,8" alt="Venus" href="venus.html"> </map> </body> </html>테스트를 보세요 ‹/›
IEFirefoxOperaChromeSafari
모든 주요 브라우저가 name 속성을 지원합니다.
name 속성은 이미지 맵의 이름을 지정합니다.
name 속성이 <img>의 usemap 속성과 연결되어 이미지와 맵 간의 관계를 생성합니다.
없음.
<map name="mapname">
값 | 설명 |
---|---|
mapname | 이미지 맵의 이름. |