haXe API Documentation
Back | Index
extern class js.html.Animation
Available in js

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.


Documentation for this class was provided by MDN.
var delay(default,null) : Float
var direction(default,null) : Int
var duration(default,null) : Float
var elapsedTime : Float
var ended(default,null) : Bool
var fillMode(default,null) : Int
var iterationCount(default,null) : Int
var name(default,null) : String
var paused(default,null) : Bool
function pause() : Void
function play() : Void
static inline var DIRECTION_ALTERNATE : Int
static inline var DIRECTION_NORMAL : Int
static inline var FILL_BACKWARDS : Int
static inline var FILL_BOTH : Int
static inline var FILL_FORWARDS : Int
static inline var FILL_NONE : Int
Back | Index