SMIL Sequence
- Page précédente Temps SMIL
- Page suivante SMIL Parallel
<seq> - Most commonly used SMIL element - defines a sequence.
Sequence element <seq>
The <seq> element can define 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 times the display is repeated. |
For a complete list of SMIL elements and attributes, please visit CodeW3C.com SMIL Reference Manual。
Exemple : affichage de la séquence d'images
<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>
Exemple : affichage de la séquence de texte
<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"> Je vais afficher pendant une seconde</h2> <h2 class="t" dur="2s"> Je vais afficher pendant deux secondes</h2> <h2 class="t" dur="3s"> Je vais afficher pendant trois secondes</h2> </t:seq> </body> </html>
- Page précédente Temps SMIL
- Page suivante SMIL Parallel