animation
英[??n??me??n] 美[??n??me??n]
n. Angry, lively; cartoon production, cartoon shooting; [film and television] animation
Plural: animations
duration
英[dju?re??n] 美[du?re??n]
n.Duration, duration, period ;(time) persistence, persistence, continuity;[Phonology] sound length, sound duration
plural: durations
css animation-duration attribute syntax
How to use the animation-duration attribute?
The animation-duration attribute is used to define the time required for the animation to complete a cycle, in seconds or milliseconds; the basic syntax is animation-duration: time.
Function: The animation-duration attribute defines the time required for the animation to complete a cycle, measured in seconds or milliseconds.
Syntax: animation-duration: time
Description: time specifies the time it takes to complete the animation. The default value is 0, which means no animation effect.?
Note: Internet Explorer 9 and earlier versions do not support the animation-duration attribute.
css animation-duration attribute example
<!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 屬性,否則時長為 0,就不會播放動畫了。</p> </body> </html>
Run instance ?
Click the "Run instance" button to view the online instance