REPEATDUR Attribute | repeatDur参数属性 | DHTML中文手册 |
Sets or retrieves the number of seconds that an element's timeline repeats.
The
dhtml语法
HTML <ELEMENT REPEATDUR = sTime... > Scripting object.repeatDur [ = sTime ]
DHTML可能的值
sTime Stringthat specifies one of the following values:
indefinite Default. Timeline repeats indefinitely. totaldur Total amount of time to repeat the element's timeline. The value must be specified as described in Time Formats. The property is read/write. The property has a default value of indefinite.
Remarks
Use the dur or end property to define each repeat iteration. the repeatdur property has no effect if the duration is not defined or is indefinite.
do not use this property on the same element as the repeatcount attribute. typically, repeatdur is set on elements that are time containers, such as the t:par or t:seq elements. elements with the timecontainer attribute set are also time containers. if you set the repeatdur attribute on an element that is not a time container, it sets the element's duration to the repeatdur value. this property is useful for coordinating the timing of an element with a media element that has a fractional duration, such as an audio file with a duration of 3.45 seconds.
a repeatdur value of 0 is invalid. if 0 is specified, the default value is used instead.
DHTML代码范例
This example uses the repeatDur attribute to demonstrate how to repeat an element's timeline.
<HTML XMLNS:t="urn:schemas-microsoft-com:time"> <HEAD> <TITLE>repeatDur Property</TITLE> <?IMPORT namespace="t" implementation="#default#time2"> <STYLE> .time { behavior: url(#default#time2) } </STYLE> </HEAD> <BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="fixed" BGCOLOR="#FFFFFF" LINK="#000000" VLINK="#808080" ALINK="#000000"> <t:SEQ repeatDur="27" begin="0"> <DIV ID="d1" CLASS="time" DUR="3">The first line appears for 3 seconds.</DIV> <DIV ID="d2" CLASS="time" DUR="3">The second line appears for 3 seconds after the first line disappears.</DIV> <DIV ID="d3" CLASS="time" DUR="3">The third line appears for 3 seconds after the second line disappears. The first line reappears.</DIV> </t:SEQ> </BODY> </HTML>
是否符合公共标准
This property is defined in Synchronized Multimedia Integration Language (SMIL) 2.0 .
Applies To
t:ANIMATE, t:ANIMATECOLOR, t:ANIMATEMOTION, t:ANIMATION, t:AUDIO, t:EXCL, t:IMG, t:MEDIA, t:PAR, t:REF, t:SEQ, t:SET, time2, t:VIDEO, t:TRANSITIONFILTER
更多语法参考
introduction to html+time, activedur, dur, mediadur, segmentdur, simpleDur