HTML <area> shape 屬性
實例
帶有可點擊區域的圖像映射:
<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>
流覽器支持
所有主流流覽器都支持 shape 屬性
定義和用法
shape 屬性指定了區域的形狀。
shape 屬性與 coords 屬性配合,可以規定區域的尺寸、形狀和位置。
HTML 4.01 與 HTML5之間的差異
NONE.
語法
<area shape="default|rect|circle|poly">
屬性值
值 | 描述 |
---|---|
default | 規定全部區域。 |
rect | 定義矩形區域。 |
circle | 定義圓形。 |
poly | 定義多邊形區域。 |