t:PAR Element | par Behavior?deprecated) | DHTML中文手册 |
defines a new timeline container in an html document for independently timed elements.
dhtml语法
XML <t:PAR ID=sID STYLE="behavior:url('#default#time')" /> HTML N/A Scripting N/A
DHTML可能的值
sID String that specifies a unique identifier for the object.
Members Table
Attribute Property Description t:accelerate accelerate Sets or retrieves a value that applies an acceleration to the element's local timeline. t:autoreverse autoReverse Sets or retrieves whether the timeline on an element immediately begins playing in reverse after completing in the forward direction. t:begin begin Sets or retrieves the delay time before the timeline begins playing on the element. t:beginafter beginAfter Sets or retrieves a value indicating that the timeline of an element starts when the referenced element ends. t:beginevent beginEvent Sets or retrieves a value that starts the timeline of an element when the referenced event occurs. t:beginwith beginWith Sets or retrieves a value that starts an element's timeline at the same time as the referenced element. currTime Retrieves a value indicating the current time along the simple duration as defined by the element's t:dur or t:end attribute. t:decelerate decelerate Sets or retrieves a value that applies a deceleration to the end of a simple duration. t:dur dur Sets or retrieves a value indicating the amount of time the element remains active or displayed. t:end end Sets or retrieves a value indicating the end time for the element, or the end of the simple duration when the element is set to repeat. t:endevent endEvent Sets or retrieves a value indicating that the timeline of an element ends immediately when the referenced event occurs, regardless of the element's repeat count or repeatdur property. t:endhold endHold Sets or retrieves whether an element remains active if its timeline ends before the timeline on its parent element ends. t:eventrestart eventRestart Sets or retrieves whether the element should restart if a beginevent call occurs while the local timeline is already running. localTime Retrieves a value indicating the current time along the local duration, as defined by the element's t:repeat or t:repeatdur attribute. t:repeat repeat Sets or retrieves the number of times an element's timeline repeats. t:repeatdur repeatDur Sets or retrieves the number of seconds an element's timeline repeats. t:syncbehavior syncBehavior Sets or retrieves the synchronization rules for the element's timeline. syncTolerance Retrieves the time variance allowed on a timeline with locked synchronization. t:timeaction timeAction Sets or retrieves what action is taken on the element while the timeline is active.
Event Description onbegin Fires when the timeline starts on an element. onend Fires when the timeline stops on an element. onmediacomplete Fires when the element's associated media is finished loading. onmedialoadfailed Fires when an element's media file fails to load for any reason. onmediaslip Fires when an element's media file fails to keep up with the defined timeline. onpause Fires when the timeline on an element pauses. onrepeat Fires when the timeline repeats on an element, beginning with the second iteration. onresume Fires when an element's timeline resumes from a paused state. onresync Fires when the element's associated media synchronization is interrupted. onreverse Fires when the timeline on an element begins to play backward.
Method Description beginElement Starts the element on the timeline. endElement Stops the element on the timeline.
Remarks
All HTML descendants of this element have independent, or parallel, timing.
Use this element instead of the t:timeline attribute to create a time container without using an html element. all descendant elements, or time children, of this new time container inherit the time properties of their container. unlike the time children of the t:seq element, the par descendants have no implicit timing relationships with each other, and their timelines might overlap. the t:par element effectively groups elements together so they can be easily modified as a single unit.
the prefix t is used to associate this element with an xml namespace. you must include the following line of code in the head section of your HTML document when using this element.
<XML:NAMESPACE PREFIX="t"/>The t:PAR element is available as of Microsoft?Internet Explorer 5, only in the Microsoft?Win32?platform.
DHTML代码范例
This example uses the t:PAR element to apply a timeline to a group of HTML elements.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <XML:NAMESPACE PREFIX="t"/> <STYLE> .time { behavior:url(#default#time);} </STYLE> </HEAD> <BODY BGCOLOR="white"> <FONT FACE="Verdana"> <t:PAR CLASS=time t:BEGIN="0" t:DUR="10" t:TIMEACTION="display"> <H3>Paragraph 1</H3> <P>This is paragraph number one. It appears for ten seconds immediately after the page is loaded.</P> <SPAN CLASS=time t:BEGIN="5"> <H3>Paragraph 2</H3> <P>This is paragraph number two. It appears five seconds after the page is loaded, and remains displayed until its parent element's timeline ends at ten seconds.</P> </SPAN> </t:PAR> </FONT> </BODY> </HTML>
更多语法参考
introduction to dhtml behaviors, introduction to html+time, time, time2, Using DHTML Behaviors