WebKitCSSKeyframesRule Class Reference

Inherits from
CSSRule
Availability
Available in Safari 4.0 and later.
Available in iOS 2.0 and later.
Companion guide

Overview

WebKitCSSKeyframesRule objects represent the keyframes for a single animation, that is, the contents of an @-webkit-keyframes CSS rule used in animations. The WebKitAnimationEvent class encapsulate information about running animations.

Tasks

Accessing Properties

Changing Rules

Properties

cssRules

The set of style rules that define the keyframes following the animation name.

readonly attribute CSSRuleList cssRules;
Availability

name

The name of the target animation that is set using the -webkit-animation-name property.

attribute DOMString name;
Availability

Methods

deleteRule

Removes a keyframe rule from the collection of keyframes.

void deleteRule(in DOMString key);
Parameters
key

A selector for the rule that is either a percentage or the keyword from or to.

Availability
  • Available in Safari 4.0 and later.
  • Available in iOS 2.0 and later.

findRule

Returns the keyframe rule for the specified selector.

WebKitCSSKeyframeRule findRule(in DOMString key);
Parameters
key

A selector for the rule that is either a percentage or the keyword from or to.

Return Value

Returns the keyframe rule corresponding to the given selector if it exists.

Availability
  • Available in Safari 4.0 and later.
  • Available in iOS 2.0 and later.

insertRule

Adds a keyframe rule to the collection of keyframes.

void insertRule(in DOMString rule);
Parameters
rule

A string representing a selector and keyframe, where the selector is a percentage or keyword and the keyframe is a block. The string must follow the format for keyframe blocks in the @-webkit-keyframes CSS rule.

Availability
  • Available in Safari 4.0 and later.
  • Available in iOS 2.0 and later.