Horizontal Gradient Example (VML)


Purpose

This example illustrates how to use attributes of the Fill child element to define a gradient fill.

Example


Code

<!-- Include the VML behavior -->
<style>v\: * { behavior:url(#default#VML); display:inline-block }</style>

<!-- Declare the VML namespace -->
<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v" />

<v:rect style="height:80pt;width:120pt" coordsize="21600,21600" fillcolor="red">
 <v:fill type="gradient" color2="blue" />
</v:rect>