comment faire en CSS animation à jouer toutes les 10 secondes
J'ai un css animation, qu'elle soit de répétition infinie ou seulement un certain temps. mais je tiens à le jouer comme 2 fois toutes les 5 secondes.
Voici mon code:
#countText{
-webkit-animation-name: color2;
-webkit-animation-duration: 1s;
-webkit-animation-iteration-count: 2;
-webkit-animation-timing-function: linear;
-webkit-animation-delay: 5s;
}
@-webkit-keyframes color2 {
0% { }
25% { text-shadow:-2px -5px 10px #fb0017, -5px 0px 10px #3a00cd, -5px 5px 10px #00ff3a}
50% { }
75% { text-shadow:2px 5px 10px #fb0017, 5px 0px 10px #3a00cd, 5px -5px 10px #00ff3a; }
100% {}
}
Vous devez vous connecter pour publier un commentaire.
Vous pouvez modifier les images clés pour afficher les animations deux fois. D'abord à partir de
0%
à20%
et la prochaine de20%
à40%
, puis de la laisser rester comme ça jusqu'à100%
. Maintenant, changezanimation-duration
à5s
sansanimation-delay
Démo