t:DUR Attribute | dur Property?deprecated) | DHTML中文手册 |
sets or retrieves a value indicating the amount of time the element remains active or displayed.
dhtml语法
xml <ELEMENT t:DUR = sTime... > Scripting object.dur [ = sTime ]
DHTML可能的值
sTime Stringthat specifies one of the following values:
indefinite Default. 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. The property has a default value of indefinite.
Remarks
The t:DUR attribute is a value relative to the value of the element's t:begin attribute. by contrast, the t:end attribute represents an absolute value along the parent element's timeline starting at 0 seconds. do not use the t:dur attribute on the same element as the t:end attribute.
a dur value of 0 is invalid. if 0 is specified, the default value is used instead.
DHTML代码范例
This example uses the t:DUR attribute to display lines of text for different amounts of time.
<!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" 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" 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" TIMEACTION="visibility"> <H3>Paragraph 3</H3> <P>This is paragraph number three. It displays indefinitely.</P> </SPAN> </BODY> </HTML>
是否符合公共标准
This property is defined in HTML+TIME (Timed Interactive Multimedia Extensions) 1.0 .
Applies To
t:AUDIO, t:IMG, t:MEDIA, t:PAR, t:SEQ, time, t:VIDEO
更多语法参考
t:begin, Introduction to HTML+TIME