DUR Attribute | dur Property
Sets or retrieves a value indicating the amount of time the element remains active or displayed.
Syntax
HTML <ELEMENT STYLE="behavior:url(#default#time);" t:DUR = sTime... > Scripting object.dur [ = sTime ]
Possible Values
sTime String that specifies one of the following values:
indefinite Element remains active on the timeline for an indefinite amount of time. duration Amount of time the element remains active or displayed. The time must be specified as described in Time Formats. The property is read/write with a default value of indefinite. This property cannot be modified in script after the onload event fires on the document body.
Remarks
The DUR attribute is a value relative to the value of the element's BEGIN attribute. By contrast, the END attribute represents an absolute value along the parent element's timeline starting at 0 seconds. Do not use the DUR attribute on the same element as the END attribute.
The prefix t is used to associate this attribute with an XML namespace.
Example
This example uses the DUR attribute to display lines of text for different amounts of time.
Sample Code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"> <HTML> <HEAD> <STYLE> .time { behavior: url(#default#time);} </STYLE> </HEAD> <BODY BGCOLOR="white"> <SPAN CLASS=time STYLE="COLOR:Red;" t:BEGIN="0" t:DUR="5" t:TIMEACTION="visibility"> <H3>Paragraph 1</H3> <P>This is paragraph number one. It displays for five seconds.</P> </SPAN> <SPAN CLASS=time STYLE="COLOR:Blue;" t:BEGIN="0" t:DUR="10" t:TIMEACTION="visibility"> <H3>Paragraph 2</H3> <P>This is paragraph number two. It displays for ten seconds.</P> </SPAN> <SPAN CLASS=time STYLE="COLOR:Green;" t:BEGIN="0" t:DUR="indefinite" t:TIMEACTION="visibility"> <H3>Paragraph 3</H3> <P>This is paragraph number three. It displays indefinitely.</P> </SPAN> </BODY> </HTML>
Applies To
[ Object Name ] Platform Version Win16: Win32: Mac: Unix: WinCE: Version data is listed when the mouse hovers over a link, or the link has focus. animation, audio, img, media, par, seq, time, video
See Also
html+time
Did you find this topic useful? Suggestions for other topics? write us!
© 1999 microsoft corporation. all rights reserved. terms of use.