HTML <a> 標(biāo)簽的 shape 屬性
定義和用法
shape 屬性與 coords 屬性配合,可以規(guī)定 object 或 img 元素中鏈接的尺寸、形狀和位置。
提示:如需創(chuàng)建能夠在所有瀏覽器中運(yùn)行的圖像映射,請(qǐng)使用 area 元素。
實(shí)例
<object data="planets.gif" alt="Planets" type="image/gif" usemap="#Map1"> <map name="Map1"> <a href="sun.htm"shape="rect"
coords="0,0,110,260">Sun</a> <a href="mercur.htm"shape="circle"
coords="129,161,10">Mercury</a> <a href="venus.htm"shape="circle"
coords="180,139,14">Venus</a> </map> </object>
瀏覽器支持
只有 Firefox 和 Opera 支持 shape 屬性。
語法
<a shape="value">
屬性值
值 | 描述 |
---|---|
default | 規(guī)定全部區(qū)域。 |
rect | 定義矩形區(qū)域。 |
circle | 定義圓形。 |
poly | 定義多邊形區(qū)域。 |