animation-name-002-manual.html (1236B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Animations Test: animation-name matchs keyframes at-rule</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="When animation-name is set to refer to a keyframe at-rule 11 that provides the property values for the animation, 12 animation will execute."> 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 starts moving from right to left on the page load. 37 </p> 38 <div>Filler Text</div> 39 </body>