--- title: slug: Web/HTML/Element/map translation_of: Web/HTML/Element/map --- 这篇文章翻译不完整 HTML <map> 属性 与 {{HTMLElement("area")}} 属性一起使用来定义一个图像映射 (一个可点击的链接区域). 内容类别 流式内容,短语内容,palpable 内容。 允许的内容 任何透明元素。 标签省略 {{no_tag_omission}} 允许的父元素 任何接受短语内容的元素。 DOM 接口 {{domxref("HTMLMapElement")}} 属性 这个元素拥有全局属性。 {{htmlattrdef("name")}} name 属性 给 map 一个名字用来查询,这个属性是必须的,值必须不能为空并且不能带空格。name 属性不准与同文档中其他 map 元素的值相同,如果 id 属性也被添加,name 属性和 id 属性的值必须相同。 示例 <map name="example-map-1"> <area shape="circle" coords="200,250,25" href="another.htm" /> <area shape="default" /> </map> 结果 {{ EmbedLiveSample('Examples', '350', '166', '', 'Web/HTML/Element/map') }} Expected live example output The live example above should appear similar to the following images (when using your keyboard tab key): For the left.html link: For the right.html link 规范 Specification Status Comment {{SpecName('HTML WHATWG', 'the-map-element.html#the-map-element', '<map>')}} {{Spec2('HTML WHATWG')}} {{SpecName('HTML5 W3C', 'embedded-content-0.html#the-map-element', '<map>')}} {{Spec2('HTML5 W3C')}} {{SpecName('HTML4.01', 'struct/objects.html#h-13.6.1', '<map>')}} {{Spec2('HTML4.01')}} Initial definition 浏览器兼容性 {{Compat("html.elements.map")}} 另见 {{HTMLElement("a")}} {{HTMLElement("area")}} {{HTMLRef}}
这篇文章翻译不完整
HTML <map> 属性 与 {{HTMLElement("area")}} 属性一起使用来定义一个图像映射 (一个可点击的链接区域).
<map>
这个元素拥有全局属性。
<map name="example-map-1"> <area shape="circle" coords="200,250,25" href="another.htm" /> <area shape="default" /> </map>
{{ EmbedLiveSample('Examples', '350', '166', '', 'Web/HTML/Element/map') }}
The live example above should appear similar to the following images (when using your keyboard tab key):
For the left.html link:
left.html
For the right.html link
right.html
{{HTMLRef}}