transition-property-021-manual.html (1154B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Transitions Test: transition-property - left</title> 4 <link rel="author" title="Intel" href="http://www.intel.com"> 5 <link rel="author" title="Shiyou Tan" href="mailto:shiyoux.tan@intel.com"> 6 <link rel="help" href="https://drafts.csswg.org/web-animations-1/#animation-type"> 7 <link rel="help" href="https://www.w3.org/TR/CSS22/visuren.html#position-props"> 8 <meta name="assert" content="Test checks that the 'left' property is animatable."> 9 <style> 10 #test { 11 background-color: blue; 12 height: 100px; 13 left: 10px; 14 position: relative; 15 transition-duration: 4s; 16 transition-property: left; 17 transition-timing-function: linear; 18 width: 100px; 19 } 20 </style> 21 <body> 22 <p>Click the blue square inside the box with black border below. Test passes if the blue square moves gradually not immediately from left to right until it stops.</p> 23 <div id="test"></div> 24 <script> 25 (function() { 26 var test = document.querySelector("#test"); 27 test.addEventListener("click", function(evt) { 28 test.setAttribute("style", "left: 400px;"); 29 }, false); 30 })(); 31 </script> 32 </body>