animation-iteration-count-003-manual.html (1211B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Animations Test: animation-iteration-count - negative 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="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-iteration-count"> 9 <meta name="flags" content="animated"> 10 <meta name="assert" content="When animation-iteration-count is set to negative count, 11 it is invalid and animation will play from beginning to end once."> 12 <style> 13 div { 14 animation-name: sample; 15 animation-duration: 10s; 16 animation-iteration-count: -2; 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 once. 37 </p> 38 <div>Filler Text</div> 39 </body>