animation-fill-mode-002-manual.html (1327B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Animations Test: animation-fill-mode - forwards</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/#animation-fill-mode"> 9 <meta name="flags" content="animated"> 10 <meta name="assert" content="When animation-fill-mode is set to forwards, 11 animation will apply the property values for the time the amination ended 12 after the animation ends."> 13 <style> 14 div { 15 animation-name: sample; 16 animation-duration: 5s; 17 animation-fill-mode: forwards; 18 19 background-color: blue; 20 height: 100px; 21 width: 100px; 22 position: relative; 23 } 24 @keyframes sample { 25 from { 26 background-color: yellow; 27 } 28 to { 29 background-color: green; 30 } 31 } 32 </style> 33 <body> 34 <p> 35 Test passes if there is a filled color square with 'Filler Text', 36 whose color gradually changes in the order: 37 YELLOW to GREEN. 38 </p> 39 <div>Filler Text</div> 40 </body>