animation-name-001-manual.html (1355B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Animations Test: animation-name - 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-06 --> 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="Check that animation-name is set without any value, 11 there will be no animation."> 12 <style> 13 div { 14 animation-name: ; 15 animation-duration: 8s; 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 staying left about 2 seconds, then moves from right to left. 36 </p> 37 <div>Filler Text</div> 38 <script> 39 setTimeout(setAnimationName, 2000); 40 41 function setAnimationName () { 42 var div = document.getElementsByTagName("div"); 43 div[0].style.animationName = "sample"; 44 } 45 </script> 46 </body>