Animation

英[dju?re??n ] US [du?re??n]

n Dauer, Dauer, Periode; (Phonologie) Lautl?nge, Lautdauer

Plural: Dauern

CSS-Animationsdauer-Eigenschaft Syntax

Wie verwende ich das Attribut ?animation-duration“? Das Attribut

animation-duration wird verwendet, um die Zeit zu definieren, die die Animation ben?tigt, um einen Zyklus abzuschlie?en, in Sekunden oder Millisekunden. Die grundlegende Syntax ist ?animation-duration: time“.

Funktion: Das Attribut animation-duration definiert die Zeit, die die Animation ben?tigt, um einen Zyklus abzuschlie?en, gemessen in Sekunden oder Millisekunden.

Syntax: animation-duration: time

Beschreibung: time gibt die Zeit an, die zum Abschluss der Animation ben?tigt wird. Der Standardwert ist 0, was bedeutet, dass kein Animationseffekt vorliegt.?

Hinweis: Internet Explorer 9 und frühere Versionen unterstützen das Attribut ?animation-duration“ nicht.

CSS-Animationsdauer-Eigenschaft Beispiel

<!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>始終規(guī)定 animation-duration 屬性,否則時(shí)長為 0,就不會播放動(dòng)畫了。</p>

</body>
</html>

Instanz ausführen ?

Klicken Sie auf die Schaltfl?che ?Instanz ausführen“, um die Online-Instanz anzuzeigen