Udostępnij za pośrednictwem


Animating pointer clicks (HTML)

Use pointer animations to provide users with visual feedback of a tap or click on an item. The pointer down animation is played when a user taps or clicks on an item. The animation slightly shrinks the item to indicate that it is pressed. The pointer up animation is played when the tap or click is released. This animation restores the item to its original size, to indicate that it has been released.

This set of animations consists of the following APIs:

The following video demonstrates the pointer down and pointer up animations:

Other resources

For code examples that demonstrate the use of the pointer animation APIs, see the HTML animation library sample.

For design best practices in the use of these animations, see Guidelines and checklist for pointer click animations.

Animating your UI

pointerUp

pointerDown