Animation

英[d??le? ] US [d??le]

retard, procrastination; temps à retarder ou à reporter

vt; retard, retard

vi. Participe présent : retardé Passé : retardé Participe passé : retardé

propriété CSS animation-delay syntaxe

Comment utiliser l'attribut animation-delay ?

L'attribut animation-delay définit le moment où l'animation démarre. La syntaxe de base est?: animation-delay?: time. La valeur du temps est mesurée en secondes (s) ou en millisecondes (ms) ; des valeurs négatives sont autorisées, par exemple : -2s provoque le démarrage immédiat de l'animation, mais saute 2 secondes pour entrer dans l'animation.

Fonction?: attribut animation-delay définit le moment où l'animation démarre. la valeur du délai d'animation est en secondes ou en millisecondes.

Syntaxe?: animation-delay?: time;

Description?: time Facultatif. Définit le temps, en secondes ou millisecondes, à attendre avant le démarrage de l'animation. La valeur par défaut est 0, les valeurs négatives sont autorisées, par exemple : -2s provoque le démarrage immédiat de l'animation, mais saute 2 secondes pour entrer dans l'animation.?

Remarque?: Internet Explorer 9 et les versions antérieures ne prennent pas en charge l'attribut animation-delay.

propriété CSS animation-delay exemple

<!DOCTYPE html>
<html>
<head>
<style> 
div
{
width:100px;
height:100px;
background:red;
position:relative;
animation:mymove 5s infinite;
animation-delay:2s;

/*Safari and Chrome*/
-webkit-animation:mymove 5s infinite;
-webkit-animation-delay:2s;
}

@keyframes mymove
{
from {left:0px;}
to {left:200px;}
}

@-webkit-keyframes mymove /*Safari and Chrome*/
{
from {left:0px;}
to {left:200px;}
}
</style>
</head>
<body>

<p><strong>注釋:</strong>Internet Explorer 9 以及更早的版本不支持 animation-delay 屬性。</p>

<div></div>

</body>
</html>

Exécuter l'instance ?

Cliquez sur le bouton ??Exécuter l'instance?? pour afficher l'instance en ligne