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> 标签