BY Attribute | by Property
This topic documents a feature of HTML+TIME 2.0, which is obsolete as of Windows Internet Explorer 9.
Specifies a relative offset value for the progress of the transitionFilter element.
Syntax
HTML <t:TRANSITIONFILTER BY = sBy... > Scripting [ sBy = ] t:TRANSITIONFILTER.by [ = sBy ]
Possible Values
sBy String that specifies or receives the relative offset value for the progress of the transitionFilter element. Legal values are real numbers in the range 0-1. The property is read/write. The property has no default value.
Remarks
by was introduced in Microsoft Internet Explorer 6.
The by attribute specifies the relative offset value of the progress from the value of the from attribute. For example, if from has a value of 0.2 and by has a value of 0.5, then the transition starts at a progress of 0.2 and ends at a progress of 0.7. In contrast, if the from attribute is set to a value of 0.2 and the to attribute is set to a value of 0.5, then the transition starts at a progress of 0.2 and ends at a progress of 0.5.
The by property cannot be used on the same transitionFilter element as the to property. If both properties are specified, the by value is ignored.
The value specified for the by property is ignored if the values attribute is specified.
When you write 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.by='0.4'; 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 by property to stop a transition partway through 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" BY="0.4" TYPE="barWipe" DUR="3" TARGETELEMENT="oDiv1" /> <DIV CLASS="time" ID="oDiv1" DUR="indefinite" STYLE="position:relative; left:20px; width:420px; height:100px; background-image:url(ART_time_progress.gif); background-repeat: no-repeat;"> </DIV> </BODY> </HTML>
Code example: http://samples.msdn.microsoft.com/workshop/samples/author/behaviors/htmltime/transitions/byEX1.html
Applies To
t:TRANSITIONFILTER
See Also