HTML <area> shape 屬性
示例
使用 shape 屬性指定影像對映中每個區域的形狀。
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="太陽">
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="水星">
<area shape="circle" coords="124,58,8" href="venus.htm" alt="金星">
</map>
自己動手試一試 »
定義和用法
shape
屬性指定一個區域的形狀。
shape
屬性與 coords
屬性一起使用,以指定區域的大小、形狀和位置。
瀏覽器支援
Attribute | |||||
---|---|---|---|---|---|
shape | 是 | 是 | 是 | 是 | 是 |
語法
<area shape="default|rect|circle|poly">
屬性值
值 | 描述 |
---|---|
default | 指定整個區域 |
rect | 定義一個矩形區域 |
circle | 定義一個圓形區域 |
poly | 定義一個多邊形區域 |
❮ HTML <area> 標籤