animation-duration-002-manual.html (1210B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Animations Test: animation-duration - finite value</title> 4 <link rel="author" title="Nokia Inc." href="http://www.nokia.com"> 5 <link rel="author" title="Intel" href="http://www.intel.com"> 6 <link rel="reviewer" title="Zhiqiang Zhang" href="mailto:zhiqiang.zhang@intel.com"> <!-- 2015-05-05 --> 7 <link rel="help" href="https://drafts.csswg.org/css-animations-1/#animation-name"> 8 <link rel="help" href="https://drafts.csswg.org/css-animations-1/#animation-duration"> 9 <meta name="flags" content="animated"> 10 <meta name="assert" content="When animation-duration is set a finite time offset, 11 animation takes the specifies time to complete one cycle."> 12 <style> 13 div { 14 animation-name: sample; 15 animation-duration: 10s; 16 17 background-color: blue; 18 height: 100px; 19 width: 100px; 20 position: relative; 21 } 22 23 @keyframes sample { 24 from { 25 left: 150px; 26 } 27 to { 28 left: 0px; 29 } 30 } 31 </style> 32 <body> 33 <p> 34 Test passes if there is a filled blue square with 'Filler Text', 35 which starts moving from right to left upon page load and lasts for a span of 10 seconds. 36 </p> 37 <div>Filler Text</div> 38 </body>