P粉2390894432023-08-21 17:16:38
If you use more animation properties, you can use Shorthand :
animation: bubble 2s linear 0.5s 1 normal forwards;
Set like this:
bubble
Animation name2s
Durationlinear
Time function0.5s
Delay1
Number of iterations (can be 'infinite
')normal
Directionforwards
fill mode (set to 'backwards' if you wish to be compatible with using the end position as the final state [this is to support browsers with animations turned off] {only answer headers, not your specific situation})Available time functions:
ease | ease-in | ease-out | ease-in-out | linear | step-start | step-end
Available directions:
normal | reverse | alternate | alternate-reverse
P粉5643017822023-08-21 15:00:10
Try adding animation-fill-mode: forwards;
. For example, you can use abbreviations like this:
animation: bubble 1.0s forwards;
https://developer.mozilla.org/en-US/docs/Web/CSS/animation-fill-mode