animation-name-005-manual.html (1070B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Animations Test: animation-name - ::after</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-06 --> 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 <meta name="flags" content="animated"> 9 <meta name="assert" content="Check that animation-name applies to the ::after pseudo element."> 10 <style> 11 div::after { 12 animation-name: sample; 13 animation-duration: 10s; 14 15 background-color: blue; 16 content: "Filler Text"; 17 display: block; 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 moving from right to left on the page load. 36 </p> 37 <div></div> 38 </body>