Computer: Makeuper: HTML: Ex01
回到 Computer ‧ 回到 Computer: Makeuper ‧ 回到 Computer: Makeuper: HTML
主題:指定圖片某一區域連向某處的語法
注意,目前教的這個 IE 似乎不能使用,請知道如何讓 IE 看到的人幫忙寫個 IE 用的吧,感謝。
- - - - - - - - - - - - - - - - -
<body> <P><OBJECT data="html_usemap_01.PNG" type="image/png" usemap="#map1" style="border:1px solid red;"> <P>This is a navigation bar. </OBJECT> <MAP name="map1"> <AREA href="html_usemap_01.html" alt=" Rectangle 矩形 " title=" Rectangle 矩形 " shape="rect" coords="141,40, 252,116"> <AREA href="html_usemap_01.html" alt=" Circle 圓形 " title=" Circle 圓形 " shape="circle" coords="91,238, 45"> <AREA href="html_usemap_01.html" alt=" Poly 多邊形 " title=" Poly 多邊形 " shape="poly" coords="189,297, 143,342, 229,337"> </MAP> </body>
- - - - - - - - - - - - - - - - -
http://home.pchome.com.tw/young/kouyu/winiAlienHacker/pub/test/html_usemap_00.html
右邊那個矩形是畫好看的,不必理會。
大致上屬性跟數字的指定應該是這樣子的規則。
shape=" rect | circle | poly "
rect=" Rectangle 矩形 "
coords="141,40, 252,116"
兩者一組,前兩者為左上端點,後兩者為右下端點。
circle=" Circle 圓形 "
coords="91,238, 45"
前兩者為圓心,後一者為半徑長。
poly=" Poly 多邊形 "
coords="189,297, 143,342, 229,337"
兩者一組,代表各個端點的 X Y 軸位置。
W3C相關講義
http://www.w3.org/TR/html401/struct/objects.html#adef-usemap