DURATION Attribute | duration Property

DHTML, HTML, & CSS

DURATION Attribute | duration Property


Sets or retrieves the length of time the transition takes to complete.

Syntax

HTML { filter:filterName (DURATION = fDuration ...) }
Scripting object.filters.filterName.duration [ = fDuration ]

Possible Values

fDuration Floating-point value that specifies the length of time to complete the transition. The value is specified in seconds.milliseconds format (0.0000).

The property is read/write with no default value. However, once the transition is applied, or starts playing, the property becomes read-only.

Remarks

You can set a transition's playback duration as a parameter of the play method.

Example

This example uses the DURATION attribute and the revealTrans filter to cause two colored shapes to fade in or out during a two-second interval.

Sample Code

<SCRIPT>
function go() {
    C1.filters[0].Apply();

if (C1.style.visibility == "visible") {
        C1.style.visibility = "hidden";
	C1.filters.revealTrans.transition=2;
    }
    else {
        C1.style.visibility = "visible";
	C1.filters[0].transition=3;
    }
    C1.filters[0].Play();
}
</SCRIPT>
<INPUT TYPE=BUTTON VALUE="Play Transition" onClick="go();"></INPUT>
<SPAN ID=C1 STYLE="position:absolute;visibility:visible;
   filter:revealTrans(DURATION=2, TRANSITION=3);
   width:300; height:300; background-color: lightgreen">
<CENTER>
   <DIV STYLE="background-color=red;height=100;width:100;
      position:relative;top:100"></DIV>
</CENTER>
</SPAN>
This feature requires Internet Explorer 4.0 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
blendTrans, revealTrans

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.