英[neɪm ] Beauté [nem]
n. Nom ; personne célèbre Déterminer le nom... ;Troisième personne du singulier : noms Pluriel : noms Participe présent : nommer Passé : nommé Participe passé : nommé
propriété CSS animation-name syntaxe
Comment utiliser l'attribut animation-name ? L'attribut
animation-name est utilisé pour récupérer ou définir le nom de l'animation appliqué à l'objet. Il doit être utilisé en conjonction avec @keyframes. : nom de l'animation personnalisé.
Fonction : l'attribut animation-name spécifie le nom de l'animation @keyframes.
Syntaxe : animation-name : keyframename|none;
Description : keyframename spécifie le nom de l'image clé qui doit être liée au sélecteur. none ne spécifie aucun effet d'animation (peut être utilisé pour remplacer les animations de la cascade).
Remarque : Veuillez toujours spécifier l'attribut animation-duration, sinon la durée sera de 0 et l'animation ne sera pas jouée.
propriété CSS animation-name exemple
<!DOCTYPE html>
<html>
<head>
<style>
div
{
width:100px;
height:100px;
background:red;
position:relative;
animation-name:mymove;
animation-duration:5s;
/* Safari and Chrome */
-webkit-animation-name:mymove;
-webkit-animation-duration:5s;
}
@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-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

