You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<dfn><keyframe-selector></dfn> = from | to | <<percentage>>
226
+
</pre>
227
+
228
+
The <<rule-list>> inside of ''@keyframes'' can only contain <<keyframe-block>> rules.
229
+
230
+
The <<declaration-list>> inside of <<keyframe-block>> accepts any CSS property
231
+
except those defined in this specification,
232
+
but <em>does</em> accept the 'animation-play-state' property
233
+
and interprets it specially.
234
+
None of the properties interact with the cascade
235
+
(so using ''!important'' on them is invalid and will cause the property to be ignored).
236
+
237
+
The <<keyframe-selector>> for a <<keyframe-block>> consists of a comma-separated list of percentage values or the keywords ''from'' or ''to''. The selector is used to specify the percentage along the duration of the animation that the keyframe represents. The keyframe itself is specified by the block of property values declared on the selector. The keyword ''from'' is equivalent to the value ''0%''. The keyword ''to'' is equivalent to the value ''100%''.
238
+
Values less than ''0%'' or higher than ''100%'' are invalid
239
+
and cause their <<keyframe-block>> to be ignored.
240
+
241
+
<span class="note">Note that the percentage unit specifier must be used on percentage values. Therefore, ''0'' is an invalid keyframe selector.</span>
229
242
230
243
If a ''0%'' or ''from'' keyframe is not specified, then the user agent constructs a ''0%'' keyframe
231
244
using the computed values of the properties being animated. If a ''100%'' or ''to'' keyframe is not
232
245
specified, then the user agent constructs a ''100%'' keyframe using the computed values of the
233
-
properties being animated. If a keyframe selector specifies negative percentage values or values
234
-
higher than ''100%'', then the keyframe will be ignored.
246
+
properties being animated.
235
247
236
-
The keyframe declaration block for a keyframe rule consists of properties and values. The properties
248
+
The <<keyframe-block>> contains properties and values. The properties
237
249
defined by this specification are ignored in these rules, with the exception of
238
-
'animation-timing-function', the behavior of which is described below. In addition, keyframe rule
239
-
declarations qualified with !important are ignored.
250
+
'animation-timing-function', the behavior of which is described below. In addition, properties qualified with !important are invalid and ignored.
240
251
241
-
The @keyframes rule that is used by an animation will be the last one encountered in sorted rules
242
-
order that matches the name of the animation specified by the 'animation-name' property.
252
+
If multiple ''@keyframes'' rules are defined with the same name,
253
+
the last one in document order wins,
254
+
and all preceding ones are ignored.
243
255
244
256
<div class='example'>
245
257
<pre>
@@ -333,20 +345,6 @@ Keyframes</h2>
333
345
</figure>
334
346
</div>
335
347
336
-
The following is the grammar for the keyframes rule:
0 commit comments