Dart API Referencedart:htmlAnimation

Animation Interface

CSS animations make it possible to animate transitions from one CSS style configuration to another. Animations consist of two components: A style describing the animation and a set of keyframes that indicate the start and end states of the animation's CSS style, as well as possible intermediate waypoints along the way.

There are three key advantages to CSS animations over traditional script-driven animation techniques:

  1. They're easy to use for simple animations; you can create them without even having to know JavaScript.
  2. The animations run well, even under moderate system load. Simple animations can often perform poorly in JavaScript (unless they're well made). The rendering engine can use frame-skipping and other techniques to keep the performance as smooth as possible.
  3. Letting the browser control the animation sequence lets the browser optimize performance and efficiency by, for example, reducing the update frequency of animations running in tabs that aren't currently visible.

Static Fields

Code final int DIRECTION_ALTERNATE #

static final int DIRECTION_ALTERNATE = 1;

Code final int DIRECTION_NORMAL #

static final int DIRECTION_NORMAL = 0;

Code final int FILL_BACKWARDS #

static final int FILL_BACKWARDS = 1;

Code final int FILL_BOTH #

static final int FILL_BOTH = 3;

Code final int FILL_FORWARDS #

static final int FILL_FORWARDS = 2;

Code final int FILL_NONE #

static final int FILL_NONE = 0;

Methods

Code void pause() #

void pause();

Code void play() #

void play();

Fields

Code final num delay #

final num delay;

Code final int direction #

final int direction;

Code final num duration #

final num duration;

Code num elapsedTime #

num elapsedTime;

Code final bool ended #

final bool ended;

Code final int fillMode #

final int fillMode;

Code final int iterationCount #

final int iterationCount;

Code final String name #

final String name;

Code final bool paused #

final bool paused;

This page includes content from the Mozilla Foundation that is graciously licensed under a Creative Commons: Attribution-Sharealike license. Mozilla has no other association with Dart or dartlang.org. We encourage you to improve the web by contributing to The Mozilla Developer Network.