案例:html/html5 案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<body>
3
4
<p>请点击图像上的星球,把它们放大。</p>
5
6
<img
7
src="/img/eg_planets.jpg"
8
border="0" usemap="#planetmap"
9
alt="Planets" />
10
11
<map name="planetmap" id="planetmap">
12
13
<area
14
shape="circle"
15
coords="180,139,14"
16
nohref="nohref"
17
alt="Venus" />
18
19
<area
20
shape="circle"
21
coords="129,161,10"
22
href ="/example/html/mercur.html"
23
alt="Mercury" />
24
25
<area
26
shape="rect"
27
coords="0,0,110,260"
28
href ="/example/html/sun.html"
29
alt="Sun" />
30
31
</map>
32
33
<p><b>注释:</b>img 元素中的 "usemap" 属性引用 map 元素中的 "id" 或 "name" 属性(根据浏览器),所以我们同时向 map 元素添加了 "id" 和 "name" 属性。</p>
34
35
</body>
36
</html>
37