propriété CSS3 animation-durée


  Résultats de traduction:
Animation

英[djuˈreɪʃn ] US [duˈreɪʃn]

n Durée, durée du temps, période (temps), persistance, continuité [Phonologie] durée du son

pluriel : durées

.

propriété CSS3 animation-duréesyntaxe

Fonction : L'attribut animation-duration définit le temps nécessaire à l'animation pour terminer un cycle, mesuré en secondes ou millisecondes.

Syntaxe : animation-duration : time

Description : time spécifie le temps nécessaire pour terminer l'animation. La valeur par défaut est 0, ce qui signifie aucun effet d'animation.​

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

Le temps nécessaire pour terminer l'animation peut être défini via la propriété animation-duration en CSS3. En secondes ou millisecondes, sa valeur par défaut est 0, ce qui signifie aucun effet d'animation

propriété CSS3 animation-duréeexemple

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

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

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

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

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

<div></div>

<p><b>注释:</b>始终规定 animation-duration 属性,否则时长为 0,就不会播放动画了。</p>

</body>
</html>

Exécuter l'instance »

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

Recommandations populaires

Maison

vidéos

Questions et réponses