Safari Developer Library

Developer

WebKitCSSKeyframesRule Class Reference

Options
Deployment Target:

On This Page

WebKitCSSKeyframesRule

Inheritance


  • CSSRule
  • WebKitCSSKeyframesRule

Conforms To


Not Applicable

Import Statement


Not Applicable Not Applicable

Availability


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

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.

  • name Property

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

    Declaration

    JavaScript

    attribute DOMString name

    Availability

    Available in Safari 4.0 and later.

    Available in iOS 2.0 and later.

  • cssRules Property

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

    Declaration

    JavaScript

    readonly attribute CSSRuleList cssRules

    Availability

    Available in Safari 4.0 and later.

    Available in iOS 2.0 and later.

  • Adds a keyframe rule to the collection of keyframes.

    Declaration

    JavaScript

    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.

  • Removes a keyframe rule from the collection of keyframes.

    Declaration

    JavaScript

    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.

  • Returns the keyframe rule for the specified selector.

    Declaration

    JavaScript

    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.