BY Attribute | by Property | DHTML中文手册 |
Specifies a relative offset value for the progress of the transitionfilter.
dhtml语法
HTML <t:TRANSITIONFILTER BY = sBy... > Scripting t:TRANSITIONFILTER.by(val) [ = sBy ]
DHTML可能的值
sBy String that specifies or receives the relative offset value for the progress of the transitionFilter. Legal values are real numbers in the range 0-1. The property is read/write. The property has no default value.
Remarks
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 will start at a progress of 0.2 and end 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 will start at a progress of 0.2 and end 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 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.by='0.4'; 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 by 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" 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>
applies to
t:TRANSITIONFILTER
更多语法参考
introduction to html+time, Using HTML+TIME Transitions