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.
Properties
cssRules
The set of style rules that define the keyframes following the animation name.
readonly attribute CSSRuleList cssRules;
Availability
- Available in Safari 4.0 and later.
- Available in iOS 2.0 and later.
name
The name of the target animation that is set using the -webkit-animation-name property.
attribute DOMString name;
Availability
- Available in Safari 4.0 and later.
- Available in iOS 2.0 and later.
Methods
deleteRule
Removes a keyframe rule from the collection of keyframes.
Parameters
- key
A selector for the rule that is either a percentage or the keyword
fromorto.
Availability
- Available in Safari 4.0 and later.
- Available in iOS 2.0 and later.
findRule
Returns the keyframe rule for the specified selector.
Parameters
- key
A selector for the rule that is either a percentage or the keyword
fromorto.
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.
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-keyframesCSS rule.
Availability
- Available in Safari 4.0 and later.
- Available in iOS 2.0 and later.
© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-02-24)