HTML CSS Reference/HTML Attributes Reference/shape

Материал из Web эксперт
Перейти к: навигация, поиск

"shape" Example

<head><Title>Example For shape</Title></head>
<img src="yourImage.gif" alt="" width=200 height=100 usemap="#myMap">
   <map name="myMap">
      <area shape="rect" coords="0, 0, 100, 50" href=>
      <area shape="rect" coords="100, 0, 200, 50" href=>
      <area shape="rect" coords="0, 50, 100, 100" href=>
      <area shape="rect" coords="100, 50, 200, 100" href=>

shape is applied to

| Applied_To     |<a> (IE6 only)                  <area>                        |

shape Possible Values

Possible Values

 <element                         x and y are coordinates for the circle center, and r
 shape="circle"                  represents the radius 
 coords="x, y, r">
<element                         x1 and y1 represent the top-left rectangle
   shape="rectangle"             corner, and x2 and y2 represent the bottom- 
   coords="x1, y1, x2, y2">      right corner

<element                         each x and y pair represents the coordinates 
   shape="polygon"               of a vertex in a polygon
   coords="x1, y1, x2, y2, . . . xn, yn">
                                 The point of origin in the document is (0,0). 
                                 X increases toward the right and Y increases 
                                 toward the bottom.

"shape" Syntax and Note

Set the shape of an <a> or <area> element. 
This attribute must be used with the coords attribute. 
The shape attribute sets the shape of the element.
The coords attribute is used to define its size. 
Possible values of the shape attribute are 
poly, and