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).
As a CSSRule, CSSKeyframeRule also implements the properties of these interfaces. It has two specific properties:
CSSKeyframe.keyText'10%', '75%'. The from keyword maps to '0%' and the to keyword maps to '100%'.CSSKeyframe.style Read only
CSSStyleDeclaration of the CSS style associated with the keyfrom.As a CSSRule, CSSKeyframeRule also implements the methods of that interface. It has no specific methods.
| Specification | Status | Comment |
|---|---|---|
| CSS Animations The definition of 'CSSKeyframeRule' in that specification. | Working Draft | Initial definition |
| Desktop | ||||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
| Basic support | Yes | Yes | 48
|
10 | 12
|
4 |
keyText
|
Yes | Yes | 48 | 10 | 12 | 4 |
style
|
Yes | Yes | 48 | 10 | 12 | 4 |
| Mobile | |||||||
|---|---|---|---|---|---|---|---|
| Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | 45 | 45 | Yes | 48
|
? | ? | ? |
keyText
|
45 | 45 | Yes | Yes | ? | ? | ? |
style
|
45 | 45 | Yes | Yes | ? | ? | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/CSSKeyframeRule