We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

CSSKeyframeRule

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The CSSKeyframeRule interface describes an object representing a set of style for a given keyframe. It corresponds to the contains of a single keyframe of a @keyframes at-rule. It implements the CSSRule interface with a type value of 8 (CSSRule.KEYFRAME_RULE).

Properties

As a CSSRule, CSSKeyframeRule also implements the properties of these interfaces. It has two specific properties:

CSSKeyframe.keyText
Represents the key of the keyframe, like '10%', '75%'. The from keyword maps to '0%' and the to keyword maps to '100%'.
CSSKeyframe.style  Read only
Returns a CSSStyleDeclaration of the CSS style associated with the keyfrom.

Methods

As a CSSRule, CSSKeyframeRule also implements the methods of that interface. It has no specific methods.

Specification

Specification Status Comment
CSS Animations
The definition of 'CSSKeyframeRule' in that specification.
Working Draft Initial definition

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support (Yes) (Yes) 5.0 (5.0) -moz
48 (48)
10 12 -o
12.50[1]
4.0
Feature Android Edge Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support (Yes) (Yes) 5.0 (5.0) -moz
48 (48)
? ? ?

[1] See the blog post to Opera 12.50.

See also

Document Tags and Contributors

Contributors to this page: erikadoyle, Sebastianz, ttromey, Sheppy, fscholz, teoli, kscarfone
Last updated by: erikadoyle,