这是
实验性技术
检查
浏览器兼容性表格
要小心谨慎在生产中使用这之前。
CSSKeyframesRule
interface describes an object representing a complete set of keyframes for a CSS animation. It corresponds to the contents of a whole
@keyframes
at-rule
. It implements the
CSSRule
interface with a type value of
7
(
CSSRule.KEYFRAMES_RULE
).
由于
CSSRule
,
CSSKeyframesRule
also implements the properties of these interfaces. It has two properties :
CSSKeyframesRule.name
animation-name
特性。
CSSKeyframesRule.cssRules
只读
CSSRuleList
of the CSS rules in the media rule.
由于
CSSRule
,
CSSKeyframesRule
also implements the methods of that interface. It has three specific methods:
CSSKeyframesRule.appendRule()
DOMString
containing a keyframe in the same format as an entry of a
@keyframes
at-rule. If it contains more than one keyframe rule, a
DOMException
采用
SYNTAX_ERR
is thrown.
CSSKeyframesRule.deleteRule()
DOMString
resolving as a number between
0%
and
100%
.
CSSKeyframesRule.findRule()
DOMString
containing an index of the keyframe to be returned, resolving to a percentage between
0%
and
100%
. If no such keyframe exists,
findRule
返回
null
.
| 规范 | 状态 | 注释 |
|---|---|---|
|
CSS 动画
The definition of 'CSSKeyframesRule' in that specification. |
工作草案 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
CSSKeyframesRule
|
Chrome Yes | Edge 12 |
Firefox
48
|
IE 10 |
Opera
12
Prefixed
|
Safari 4 | WebView Android Yes | Chrome Android Yes |
Firefox Android
48
|
Opera Android
12
Prefixed
|
Safari iOS Yes | Samsung Internet Android Yes |
appendRule
|
Chrome
Yes
|
Edge 12 |
Firefox
22
|
IE
10
Alternate Name
|
Opera
Yes
Alternate Name
|
Safari
Yes
Alternate Name
|
WebView Android
Yes
|
Chrome Android
Yes
|
Firefox Android
22
|
Opera Android
Yes
Alternate Name
|
Safari iOS
Yes
Alternate Name
|
Samsung Internet Android
Yes
|
cssRules
|
Chrome Yes | Edge 12 | Firefox Yes | IE ? | Opera Yes | Safari Yes | WebView Android Yes | Chrome Android Yes | Firefox Android Yes | Opera Android Yes | Safari iOS Yes | Samsung Internet Android Yes |
deleteRule
|
Chrome Yes | Edge 12 | Firefox Yes | IE ? | Opera Yes | Safari Yes | WebView Android Yes | Chrome Android Yes | Firefox Android Yes | Opera Android Yes | Safari iOS Yes | Samsung Internet Android Yes |
findRule
|
Chrome Yes | Edge 12 | Firefox Yes | IE ? | Opera Yes | Safari Yes | WebView Android Yes | Chrome Android Yes | Firefox Android Yes | Opera Android Yes | Safari iOS Yes | Samsung Internet Android Yes |
名称
|
Chrome Yes | Edge 12 | Firefox Yes | IE ? | Opera Yes | Safari Yes | WebView Android Yes | Chrome Android Yes | Firefox Android Yes | Opera Android Yes | Safari iOS Yes | Samsung Internet Android Yes |
完整支持
兼容性未知
实验。期望将来行为有所改变。
使用非标名称。
要求使用供应商前缀或不同名称。
CSSKeyframesRule
AnimationEvent
CSS
CSSConditionRule
CSSGroupingRule
CSSKeyframeRule
CSSMediaRule
CSSNamespaceRule
CSSPageRule
CSSRule
CSSRuleList
CSSStyleDeclaration
CSSStyleRule
CSSStyleSheet
CSSSupportsRule
CaretPosition
LinkStyle
MediaQueryList
MediaQueryListListener
Screen
StyleSheet
StyleSheetList
TransitionEvent