transition-property-024-manual.html (1165B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Transitions Test: transition-property - margin-bottom</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://drafts.csswg.org/css-box-3/#margin-physical"> 8 <meta name="assert" content="Test checks that the 'margin-bottom' property is animatable."> 9 <style> 10 #ref { 11 background-color: blue; 12 height: 100px; 13 width: 100px; 14 } 15 #test { 16 margin-bottom: 1px; 17 transition-duration: 4s; 18 transition-property: margin-bottom; 19 transition-timing-function: linear; 20 } 21 </style> 22 <body> 23 <p id="test">Click blue square below. Test passes if the blue square moves down gradually not immediately until it stops.</p> 24 <div id="ref"></div> 25 <script> 26 (function() { 27 var ref = document.querySelector("#ref"); 28 ref.addEventListener("click", function(evt) { 29 document.querySelector("#test").setAttribute("style", "margin-bottom: 100px;"); 30 }, false); 31 })(); 32 </script> 33 </body>