SMIL Sequence
- Forrige Side SMIL Tidslinje
- Næste Side SMIL Parallel
<seq> - Most commonly used SMIL element - defines a sequence.
Sequence element <seq>
The <seq> element defines a sequence. The child elements of the <seq> element are displayed in sequence.
You can use the <seq> element to define a list of images to be displayed, a list of paragraphs, a list of videos, or any other elements.
The <seq> element has many attributes, the most commonly used attributes are:
Attribute | Value | Description |
---|---|---|
begin | time | The delay before the element is displayed. |
dur | time | Set the duration of the display. |
repeatCount | number | Set the number of repetitions to display. |
For a complete list of SMIL elements and attributes, please visit CodeW3C.com SMIL Reference Manual。
Eksempel: Vis billedsekvens
<html xmlns:t="urn:schemas-microsoft-com:time"> <head> <?import namespace="t" implementation="#default#time2"> <style>.t {behavior: url(#default#time2)}</style> </head> <body> <t:seq repeatCount="indefinite"> <img class="t" src="image1.jpg" dur="1s" /> <img class="t" src="image2.jpg" dur="1s" /> </t:seq> </body> </html>
Eksempel: Vis tekstsekvens
<html xmlns:t="urn:schemas-microsoft-com:time"> <head> <?import namespace="t" implementation="#default#time2"> <style>.t {behavior: url(#default#time2)}</style> </head> <body> <t:seq repeatCount="indefinite"> <h2 class="t" dur="1s"> Jeg vil vise i et sekund</h2> <h2 class="t" dur="2s"> Jeg vil vise i to sekunder</h2> <h2 class="t" dur="3s"> Jeg vil vise i tre sekunder</h2> </t:seq> </body> </html>
- Forrige Side SMIL Tidslinje
- Næste Side SMIL Parallel