Angle Attribute

HTML (DHTML)

Angle Attribute

Internet Development Index

Defines the angle of a gradient fill. Read/write VgAngle.

Applies To

Fill

Tag Syntax

<v: element angle="expression">

Script Syntax

element.angle="expression"

expression=element.angle

Remarks

The vector of a gradient is perpendicular to the vector of the blend direction from one color to another. The default value is 0 (zero) degrees, which is a horizontal vector from left to right. Positive angles rotate the gradient in a counter-clockwise direction.

VML Standard Attribute

Example

The fill of the shape is composed of a gradient of two colors, running from blue to red at an angle of 45 degrees. Red will be in the top left corner and blue will be in the bottom right corner.

   <v:shape id="rect01"
   coordorigin="0 0" coordsize="200 200"
   strokecolor="red"
   style="top:1;left:1;width:50;height:50"
   path="m 1,1 l 1,200, 200,200, 200,1 x e">
   <v:fill type="gradient" color="blue" color2="red" angle="45"/>
   </v:shape>