SMIL Timing
- Previous Page SMIL XHTML
- Next Page SMIL Sequence
Timing indicates when to start and when to end.
Timelines and Timing
Most SMIL elements use timing attributes to define the timeline of presentation.
Timing attributes define the start time of an element and its duration.
The following table lists possible time formats:
Format | Example |
---|---|
hh:mm:ss.f |
|
number [h|min|s|ms] |
|
wallclock (YYY-MM-DDThh:mm:ss+zone) |
wallclock(2003-08-01T12:10:30+1.00) (After 10:30, 12:00, August 1, 2003, Coordinated Universal Time + 1 hour) |
The value 'indefinite' can be used to define an endless loop.
Duration
The 'duration' (duration, dur="5s") attribute defines the visibility duration of the element:
<html> <head> <style>.t {behavior: url(#default#time2)}</style> </head> <body> <img class="t" src="image1.jpg" dur="5s" /> </body> </html>
When does it start?
The 'begin' (begin="2s") attribute defines when the element becomes visible (starts playing):
<html> <head> <style>.t {behavior: url(#default#time2)}</style> </head> <body> <img class="t" src="image1.jpg" begin="2s" /> </body> </html>
- Previous Page SMIL XHTML
- Next Page SMIL Sequence