<html>
<body>
<p>請(qǐng)點(diǎn)擊圖像上的星球,把它們放大。</p><imgsrc="http://www.w3school.com.cn/i/eg_planets.jpg"
border="0" usemap="#planetmap"
alt="Planets" />
<map name="planetmap" id="planetmap"><areashape="circle"
coords="180,139,14"
href ="http://www.w3school.com.cn/example/html/venus.html"
target ="_blank"
alt="Venus" />
<areashape="circle"
coords="129,161,10"
href ="http://www.w3school.com.cn/example/html/mercur.html"
target ="_blank"
alt="Mercury" />
<areashape="rect"
coords="0,0,110,260"
href ="http://www.w3school.com.cn/example/html/sun.html"
target ="_blank"
alt="Sun" />
</map><p><b>注釋:</b>img 元素中的 "usemap" 屬性引用 map 元素中的 "id" 或 "name" 屬性(根據(jù)瀏覽器),所以我們同時(shí)向 map 元素添加了 "id" 和 "name" 屬性。</p></body></html>1.第一個(gè)area是圓形shape="circle" /*說(shuō)明是圓形*/coords="180,139,14" /*圓心坐標(biāo)是(180,139),半徑14*/2.第二area個(gè)是矩形shape="rect" /*說(shuō)明是矩形*/coords="0,0,110,260" /*左上角坐標(biāo)是(0,0),右下角坐標(biāo)是(110,260)/注。單位是像素,坐標(biāo)可以是負(fù)值