SMIL Timing

Timing 表示何时开始,并何时结束。

Timelines 和 Timing

大多数 SMIL 元素使用计时属性来定义呈现的时间线。

计时属性定义了元素的开始的时间,以及持续的时间。

下面的表格列出了可能的时间格式:

format mafi
hh:mm:ss.f
  • 1:50:00 (1 saurin 50 minit)
  • 10:50 (10 minit 50 daɗin)
  • 10.5 (10.5 daɗin)

number

[h|min|s|ms]

  • 3.5h (3.5 hours)
  • 3.5min (3.5 minutes)
  • 3.5sec (3.5 seconds)
  • 35ms (35 milliseconds)

wallclock

(YYY-MM-DDThh:mm:ss+zone)

wallclock(2003-08-01T12:10:30+1.00)

( 12:10:30 after 12 o'clock, August 1, 2003, Coordinated Universal Time + 1 hour)

The value 'indefinite' can be used to define an endless loop.

Duration

Attribute 'duration' (duration, dur="5s") 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>

TIY

From when does it start?

Attribute 'begin' (begin="2s") 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>

TIY