transition-test.html (1559B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>CSS Transition Test: invalid values cause all properites to animate.</title> 5 <link rel="author" title="Oleg Janeiko" href="mailto:oleg@the-incredible.me"> 6 <link rel="help" href="http://www.w3.org/TR/css3-transitions/#transition-property-property"> 7 <link rel="match" href="reference/transition-test-ref.html"> 8 <meta name="assert" content="When an invalid value is specified as one of the transition properties, it causes the transition-property to change to 'all'. Instead of leaving the invalid property in and animating the valid properites with matching durations."> 9 <style type="text/css"> 10 .container { 11 background-color: red; 12 height: 200px; 13 width: 200px; 14 } 15 .box { 16 width: 100px; 17 height: 100px; 18 background-color: green; 19 20 transition-property: width, foo; /* invalid foo */ 21 transition-duration: 0, 5s; 22 } 23 .box.transition { 24 width: 200px; 25 height: 200px; 26 } 27 </style> 28 <script type="text/javascript" charset="utf-8"> 29 function ready(){ 30 var box = document.querySelector('.box'); 31 box.className = 'box transition'; 32 } 33 </script> 34 </head> 35 <body onload="ready();"> 36 <div> 37 <p>You should not see a red background during the transition. Note: if the test passes transition is instant.</p> 38 </div> 39 <div class="container"> 40 <div class="box"></div> 41 </div> 42 </body> 43 </html>