animation-duration-001-manual.html (1375B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Animations Test: animation-duration - blank 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 value is set blank, there will be no animation seen."> 11 <style> 12 div { 13 animation-name: sample; 14 15 background-color: blue; 16 height: 100px; 17 width: 100px; 18 position: relative; 19 } 20 21 @keyframes sample { 22 from { 23 left: 150px; 24 } 25 to { 26 left: 0px; 27 } 28 } 29 </style> 30 <body> 31 <p> 32 Test passes if there is a filled blue square with 'Filler Text', 33 which starts staying left for about 2 seconds upon page load, 34 then moves from right to left. 35 </p> 36 <div>Filler Text</div> 37 <script> 38 var div = document.getElementsByTagName("div"); 39 div[0].style.animationDuration = ""; 40 setTimeout(setAnimationDuration, 2000); 41 42 function setAnimationDuration() { 43 div[0].style.animationDuration = "10s"; 44 } 45 </script> 46 </body>