TO Attribute | to Property | DHTML中文手册 |
Sets or retrieves a value that indicates the point in the transition's progress at which the transition ends.
dhtml语法
HTML <t:TRANSITIONFILTER TO = sTo... > Scripting t:TRANSITIONFILTER.to(val) [ = sTo ]
DHTML可能的值
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
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 and from properties are set. for example, if the from property had a value of 1.0 and the to property had a value of 0.0, the transition would appear to transition out. however, to set the transition to go out, you would typically 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, developers should consider a couple of issues. because results might be unpredictable or undefined when you change the properties of an active animation, restart the animation with beginElement after you have made the change. For example:
<SCRIPT> object.endElement(); object.to='0.8'; object.beginElement(); </SCRIPT>For the animate, animatemotion, and animatecolor objects, the time2 behavior uses the following model to evaluate which properties to animate.
DHTML代码范例
This example shows how to use the to property to stop a transition part way 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" 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>
applies to
t:TRANSITIONFILTER
更多语法参考
introduction to html+time, Using HTML+TIME Transitions