HTML CSS Reference/HTML Attributes Reference/shape

Материал из Web эксперт
Версия от 11:20, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

"shape" Example

   <source lang="html4strict">
   

<HTML> <head><Title>Example For shape</Title></head> <BODY> <img src="yourImage.gif" alt="" width=200 height=100 usemap="#myMap">

  <map name="myMap">
     <area shape="rect" coords="0, 0, 100, 50" href=http://www.wbex.ru>
     <area shape="rect" coords="100, 0, 200, 50" href=http://www.microsoft.ru>
     <area shape="rect" coords="0, 50, 100, 100" href=http://www.msn.ru>
     <area shape="rect" coords="100, 50, 200, 100" href=http://www.yahoo.ru>
  </map>

</BODY> </HTML>


     </source>
   
  


shape is applied to

   <source lang="html4strict">

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

     </source>
   
  


shape Possible Values

   <source lang="html4strict">

Possible Values

<element                         x and y are coordinates for the circle center, and r
shape="circle"                  represents the radius 
coords="x, y, r">

...</element> <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>

<element each x and y pair represents the coordinates

  shape="polygon"               of a vertex in a polygon
  coords="x1, y1, x2, y2, . . . xn, yn">

...</element>

                                The point of origin in the document is (0,0). 
                                X increases toward the right and Y increases 
                                toward the bottom.
   
     
     </source>
   
  


"shape" Syntax and Note

   <source lang="html4strict">

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 circ, circle, rect, rectangle, poly, and polygon.


     </source>