animation-display-manual.html (1498B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Animations Test: animation - display</title> 4 <link rel="author" title="Intel" href="http://www.intel.com"> 5 <link rel="reviewer" title="Zhiqiang Zhang" href="mailto:zhiqiang.zhang@intel.com"> <!-- 2015-05-07 --> 6 <link rel="help" href="https://drafts.csswg.org/css-animations-1/#animation-name"> 7 <link rel="help" href="https://drafts.csswg.org/css-animations-1/#animation-duration"> 8 <link rel="help" href="https://drafts.csswg.org/css-animations-1/#animations"> 9 <meta name="flags" content="animated"> 10 <meta name="assert" content="Check that setting 'display' property to 'none' terminates 11 running animation applied to the element, and updating 'display' 12 property to a value other than 'none' will start the animation."> 13 <style> 14 div { 15 animation-name: sample; 16 animation-duration: 10s; 17 18 background-color: blue; 19 height: 100px; 20 width: 100px; 21 position: relative; 22 } 23 24 @keyframes sample { 25 from { 26 left: 150px; 27 } 28 to { 29 left: 0px; 30 } 31 } 32 </style> 33 <body> 34 <p> 35 Test passes if there is a filled blue square with 'Filler Text', 36 which moves from right to left twice. 37 </p> 38 <div>Filler Text</div> 39 <script> 40 var div = document.getElementsByTagName("div"); 41 42 setTimeout(function() { 43 div[0].style.display = "none"; 44 }, 5000); 45 46 setTimeout(function() { 47 div[0].style.display = "block"; 48 }, 8000); 49 </script> 50 </body>