HTML <area> 좌표 속성
예시
이미지 맵에서 각 영역의 좌표를 지정하려면 coords 속성을 사용하십시오.
<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>
정의 및 사용
coords
속성은 이미지 맵에서 영역의 좌표를 지정합니다 .
속성 은 coords
속성과 함께 사용되어 shape
영역의 크기, 모양 및 배치를 지정합니다.
팁: 영역의 왼쪽 위 모서리 좌표는 0,0입니다.
브라우저 지원
Attribute | |||||
---|---|---|---|---|---|
coords | Yes | Yes | Yes | Yes | Yes |
통사론
<area coords="value">
속성 값
Value | Description |
---|---|
x1,y1,x2,y2 | Specifies the coordinates of the top-left and bottom-right corner of the rectangle (shape="rect") |
x,y,radius | Specifies the coordinates of the circle center and the radius (shape="circle") |
x1,y1,x2,y2,..,xn,yn | Specifies the coordinates of the edges of the polygon. If the first and last coordinate pairs are not the same, the browser will add the last coordinate pair to close the polygon (shape="poly") |
❮ HTML <영역> 태그