Partilhar via


TO Attribute | to Property

This topic documents a feature of HTML+TIME 2.0, which is obsolete as of Windows Internet Explorer 9.

Sets or retrieves a value that indicates the point in the transition's progress at which the transition ends.

Syntax

HTML <t:TRANSITIONFILTER TO = sTo... >
Scripting [ sTo = ] t:TRANSITIONFILTER.to [ = sTo ]

Possible Values

sTo String that specifies or receives the ending progress value of the transition. Legal values are real numbers in the range 0.0-1.0.
1.0
Default. End transition at the end of the transition progress.

The property is read/write. The property has a default value of 1.0.

Remarks

to was introduced in Microsoft Internet Explorer 6.

The by property should not be used on the same element as the to property. If both properties are specified, the by value is ignored.

The transition can transition in or out depending on how the to property and the from property are set. For example, if the from property has a value of 1.0 and the to property has a value of 0.0, the transition appears to transition out. However, to set the transition to go out, you use the mode property.

The value specified for the to property is ignored if the values attribute is specified.

When writing script to dynamically change the properties of an active animation, results might be unpredictable or undefined. Restart the animation with beginElement after you change the properties. The following example shows how to use beginElement.

<SCRIPT>
object.endElement();
object.to='0.8';
object.beginElement();
</SCRIPT>

For the animate object, the animateMotion object, and the animateColor object, the time2 behavior uses the following model to evaluate which properties to animate.

  • The values property, if specified, overrides any setting for the from property, the to property, or the by property.
  • The from property is used, unless the values property or the path property is specified.
  • The to property, if specified, overrides any setting for the by property.
  • The by property doesn't override any properties.

Example

This example shows how to use the to property to stop a transition during the transition.

<HTML XMLNS:t = "urn:schemas-microsoft-com:time">
<HEAD>
  <STYLE>
    .time    {behavior: url(#default#time2);}
  </STYLE>
  <?import namespace = t urn = "urn:schemas-microsoft-com:time" 
    implementation = "#default#time2" />
</HEAD>
<BODY>

<t:TRANSITIONFILTER FROM="0.3" TO="0.7"  TYPE="barWipe" DUR="3" 
TARGETELEMENT="oDiv1" />

<DIV CLASS="time" ID="oDiv1" DUR="9"  STYLE=" font:bold x-large fantasy; 
width:400px; height:100px; background:#CC3333;color:#FFFFFF;">
<SPAN STYLE="position:relative; top:20px;margin:160;">TRANSITION!</SPAN>
</DIV>

</BODY>
</HTML>

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/htmltime/transitions/toEX1.html

Applies To

t:TRANSITIONFILTER

See Also

Introduction to HTML+TIME, Using HTML+TIME Transitions