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 | 多角形の領域を定義します。 |
その他の拡張
HTML <area> タグ