Dies ist eine experimentelle Technologie
Da diese Technologie noch nicht definitiv implementiert wurde, sollte die Browser Kompatibilität beachtet werden. Es ist auch möglich, dass der Syntax in einer späteren Spezifikation noch geändert wird.
Übersicht
animation-fill-mode definiert den Zustand einer Animation vor und nach deren Ablauf.
| Initialwert | none |
|---|---|
| Anwendbar auf | alle Elemente, ::before und ::after Pseudoelemente |
| Vererbt | Nein |
| Medien | visuell |
| Berechneter Wert | wie angegeben |
| Animationstyp | diskret |
| Kanonische Reihenfolge | die eindeutige Reihenfolge definiert durch die formale Grammatik |
Syntax
<single-animation-fill-mode>#wobei
<single-animation-fill-mode> = none | forwards | backwards | both
animation-fill-mode: none
animation-fill-mode: forwards
animation-fill-mode: backwards
animation-fill-mode: both
The # indicates that several values may be given, separated by commas.
Each applies to the animation defined in the same order in animation-name.
animation-fill-mode: none, backwards
animation-fill-mode: both, forwards, none
Werte
none- Das Element nimmt keine Werte der Animation an.
forwards- Das Element nimmt nach Ablauf die Werte des letzten Animationsschrittes an, unter der Berücksichtigung von
animation-directionundanimation-iteration-count:animation-directionanimation-iteration-countLetzte keyframe Regel normalgerade oder ungerade 100%odertoreversegerade oder ungerade 0%oderfromalternategerade 0%oderfromalternateungerade 100%odertoalternate-reversegerade 100%odertoalternate-reverseungerade 0%oderfrom backwards- Das Element nimmt die Werte des ersten Animationsschrittes an und behält diesen auch während der
animation-delayZeit.animation-directionwird wie folgt gehandhabt:animation-directionErste keyframe Regel normaloderalternate0%oderfromreverseoderalternate-reverse100%oderto both- Vereint die Werte
backwardsundforwards.
Beispiele
h1 {
animation-fill-mode: forwards;
}
Spezifikation
| Spezifikation | Status | Anmerkung |
|---|---|---|
| CSS Animations Die Definition von 'animation-fill-mode' in dieser Spezifikation. |
Arbeitsentwurf |
Browser Kompatibilität
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|
| Basic support | (Ja)-webkit | 5.0 (5.0)-moz 16.0 (16.0) |
10 | 12-o 12.10 # |
4.0-webkit |
| Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | ? | 5.0 (5.0)-moz 16.0 (16.0) |
? | ? | ? |