A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/apis/web_animations/Animatable/animate below:

animate ยท WebPlatform Docs

animate Summary

Creates a new Animation object whose animation target is the object on which the method is called, and calls the play method of the AnimationTimeline object of the document timeline of the node document [DOM4] of the element, passing the newly created Animation as the argument to the method.

Method of apis/web_animations/Animatableapis/web_animations/Animatable

Syntax
var myAnimationPlayer = myAnimationPlayer.animate();
Return Value

Returns an object of type

Returns the AnimationPlayer object returned by the play method of the AnimationTimeline.

Examples

This example creates an instance of the AnimationPlayer that animates an object horizontally and vertically using computed values, and runs for 1500ms (1.5 seconds).

var player = snowFlake.animate([
  {transform: 'translate(' + snowLeft + 'px, -100%)'},
  {transform: 'translate(' + snowLeft + 'px, ' + window.innerHeight + 'px)'}
], 1500);
Related specifications
Web Animations 1.0
W3C Working Draft
Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4