Latest web development tutorials

HTML area shape 屬性

HTML area 標籤參考手冊 HTML <area>標籤

實例

帶有可點擊區域的圖像映射:

<img src ="planets.gif" width="145" height="126" alt="Planets"
usemap="#planetmap">

<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun">
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">
</map>

嘗試一下»

瀏覽器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

所有主流瀏覽器都支持shape 屬性


定義和用法

shape 屬性指定了區域的形狀。

shape屬性與coords屬性配合,可以規定區域的尺寸、形狀和位置。


HTML 4.01 與HTML5之間的差異

NONE.


語法

<area shape="default|rect|circle|poly">

屬性值

描述
default 規定全部區域。
rect 定義矩形區域。
circ 定義圓形。
poly 定義多邊形區域。


HTML area 標籤參考手冊 HTML <area>標籤