FROM Attribute | TO Attribute

This example demonstrates how you can set the from and to attributes when using the t:ANIMATECOLOR element to animate color properties. The outer DIV element changes colors from red to yellow over a five-second duration. The inner DIV element's color begins its animation with a value of yellow and ends at red.

When you click any of the colored buttons, you reset the inner DIV's from attribute and the outer DIV's to attribute to that button's color. The inner DIV's backgroundColor will begin at the button color, but end at red; the outer DIV's backgroundColor will begin at red and end at the button color.


outerDIV
innerDIV

To view the source code, right-click this page and choose View Source from the shortcut menu that appears.

© 2007 Microsoft Corporation. All rights reserved. Terms of use.