这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
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
).
由于
CSSRule
,
CSSKeyframeRule
also implements the properties of these interfaces. It has two specific properties:
CSSKeyframe.keyText
'10%'
,
'75%'
。
from
keyword maps to
'0%'
和
to
keyword maps to
'100%'
.
CSSKeyframe.style
只读
CSSStyleDeclaration
of the CSS style associated with the keyframe.
由于
CSSRule
,
CSSKeyframeRule
also implements the methods of that interface. It has no specific methods.
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS 动画
The definition of 'CSSKeyframeRule' in that specification. |
工作草案 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
CSSKeyframeRule
|
Chrome Yes | Edge 12 |
Firefox
48
|
IE 10 |
Opera
12
Prefixed
|
Safari 4 | WebView Android 45 | Chrome Android 45 |
Firefox Android
48
|
Opera Android Yes | Safari iOS Yes | Samsung Internet Android 5.0 |
keyText
|
Chrome Yes | Edge 12 | Firefox 48 | IE 10 | Opera 12 | Safari 4 | WebView Android 45 | Chrome Android 45 | Firefox Android Yes | Opera Android Yes | Safari iOS Yes | Samsung Internet Android 5.0 |
style
|
Chrome Yes | Edge 12 | Firefox 48 | IE 10 | Opera 12 | Safari 4 | WebView Android 45 | Chrome Android 45 | Firefox Android Yes | Opera Android Yes | Safari iOS Yes | Samsung Internet Android 5.0 |
完整支持
实验。期望将来行为有所改变。
要求使用供应商前缀或不同名称。
CSSKeyframeRule
AnimationEvent
CSS
CSSConditionRule
CSSGroupingRule
CSSKeyframesRule
CSSMediaRule
CSSNamespaceRule
CSSPageRule
CSSRule
CSSRuleList
CSSStyleDeclaration
CSSStyleRule
CSSStyleSheet
CSSSupportsRule
CaretPosition
LinkStyle
MediaQueryList
MediaQueryListListener
Screen
StyleSheet
StyleSheetList
TransitionEvent