SMIL Sequence

<seq> - 最常用的 SMIL 元素 - 定义序列。

序列元素 <seq>

<seq> 元素可定义序列。<seq> 元素中的子元素依次显示在序列中。

您可以使用 <seq> 元素来定义要显示的图像列表、段落列表、视频列表,或任何其他的元素。

<seq> 元素拥有许多属性,最常用的属性有:

属性 描述
begin time 在元素被显示之前的延迟。
dur time 设置显示的持续时间。
repeatCount number 设置显示的重复次数。

如需完整的 SMIL 元素和属性列表,请访问 W3Cschool SMIL 参考手册

实例:显示图像序列

<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>

TIY

实例:显示文本序列

<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">

  I will display for one second</h2>

  <h2 class="t" dur="2s">

  I will display for two seconds</h2>

  <h2 class="t" dur="3s">

  I will display for three seconds</h2>

</t:seq>



</body>

</html>

TIY