Composition d'Animation
Nous pouvons utiliser la forme abrégée pour spécifier toutes les propriétés d'animation. La syntaxe est la suivante :
animation: <name> <duration> <timing_function> <delay> <iteration-count> <direction> <fill-mode> <play-state>
Réécrivons brièvement les propriétés suivantes.
Long chemin
animation-name: Rotation;
animation-duration: 5s;
animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
animation-delay: 100ms;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-fill-mode: backwards;
animation-play-state: running;
Abrégé
animation: Rotation 5s cubic-bezier(0.075, 0.82, 0.165, 1) 100ms infinite alternate backwards running;
Cela semble si déroutant, et nous pouvons facilement manquer une valeur. Cependant, nous avons une telle opportunité.
Remarque
Pour le navigateur, il n'y a aucune différence entre la forme abrégée et la manière longue de spécifier l'animation.
Merci pour vos commentaires !
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Awesome!
Completion rate improved to 2.04
Composition d'Animation
Glissez pour afficher le menu
Nous pouvons utiliser la forme abrégée pour spécifier toutes les propriétés d'animation. La syntaxe est la suivante :
animation: <name> <duration> <timing_function> <delay> <iteration-count> <direction> <fill-mode> <play-state>
Réécrivons brièvement les propriétés suivantes.
Long chemin
animation-name: Rotation;
animation-duration: 5s;
animation-timing-function: cubic-bezier(0.075, 0.82, 0.165, 1);
animation-delay: 100ms;
animation-iteration-count: infinite;
animation-direction: alternate;
animation-fill-mode: backwards;
animation-play-state: running;
Abrégé
animation: Rotation 5s cubic-bezier(0.075, 0.82, 0.165, 1) 100ms infinite alternate backwards running;
Cela semble si déroutant, et nous pouvons facilement manquer une valeur. Cependant, nous avons une telle opportunité.
Remarque
Pour le navigateur, il n'y a aucune différence entre la forme abrégée et la manière longue de spécifier l'animation.
Merci pour vos commentaires !