HTML coords 属性
定义和用法
coords
属性定义了图像地图中区域的坐标。
coords
属性与 shape
属性结合使用,用于指定区域的大小、形状和位置。
提示:区域左上角的坐标为 0,0。
适用范围
coords
属性可用于以下元素:
元素 | Attribute |
---|---|
<area> | coords |
示例
Area 示例
一个图像地图,带有可点击的区域
<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>
自己动手试一试 »
浏览器支持
Attribute | |||||
---|---|---|---|---|---|
coords | 是 | 是 | 是 | 是 | 是 |