English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
shape 属性指定区域的形状,shape 属性与 coords 属性配合,以指定区域的大小,形状和位置。
具有可点击区域的图像地图:
!DOCTYPE html> <html> <title>HTML:<area> shape 属性 - 基础教程网 oldtoolbag.com</title> <body> <p>单击太阳或其他行星以近距离观察它:</p> <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.html" alt="Sun"> <area shape="circle" coords="90,58,3" href="mercur.html" alt="Mercury"> <area shape="circle" coords="124,58,8" href="venus.html" alt="Venus"> </map> </body> </html>テストを見てみる ‹/›
IEFirefoxOperaChromeSafari
すべての主要ブラウザが shape 属性をサポートしています
shape 属性はエリアの形状を指定します。
shape 属性と coords 属性を組み合わせて、エリアの大きさ、形状、位置を指定します。
なし。
<area shape="default|rect|circle|poly">
値 | 説明 |
---|---|
default | すべてのエリアを指定します。 |
rect | 矩形エリアを定義します。 |
circle | 円を定義します。 |
poly | 多角形エリアを定義します。 |