Full version, Basic version, Tiny version

Specification link: 19.2 Animation elements

animate-elem-60-t ← index → animate-elem-62-t

# animate-elem-61-t
SVG Image | PNG Image
$RCSfile: animate-elem-61-t.svg,v $ $Revision: 1.6 $ multiple begin 2 offsets 2 sync bases 2 repeat 2 event base 2 accessKeys misc 0-1s 2s-4s > 5s 1-2s 4-5s |

This tests validates multiple begin conditions in the begin attribute, assuming support for the <set> element and setting the fill attribute on a <rect> element.

The test validates the various possibilities for the begin attribute value: multiple offset values, multiple event base values, multiple sync base values, multiple repeat values, and multiple accessKey values. Finally, the test validates that begin values of different kinds can be mixed.

The test shows 6 rows where a red rectangle' s x attribute is animated with <set> elements.

On the first three rows, the red rectangles should show on the left from 0 to 1s. From 1 to 2s, the rectangles should show on the right. Then the rectangles should show on the left from 2 to 4s, then on the right again from 4 to 5s and come back to the left position and stay there after 5s.

On the fourth row, the rectangle's begin condition is event based and requires a user click. After the user clicks on the rectangle, the rectangle should move to the right position for 1s, then move back to the left position for 3 seconds, move again to the right position for 1 second before going back to the left position.

On the fifth row, the rectangle's begin condition is accessKey based and requires a user to press the 'a' key. After the user presses that key the rectangle should move to the right position for 1s, then move back to the left position for 3 seconds, move again to the right position for 1 second before going back to the left position.

The last row's rectangle has a begin condition with two offset values (1s;4s) and should behave like the rectangles of the first three rows for the first 5 seconds of the document's timeline. In addition, the begin condition has a click event base and thus, the rectangle should move to the right position for one second every time the user clicks on it. Finally, the begin condition also has an accessKey condition for the 'b' character. Thus, the rectangle should move to the right position every time the user presses the 'b' key.

animate-elem-60-t ← index → animate-elem-62-t