transition-property-011-manual.html (1134B)
1 <!DOCTYPE html> 2 <meta charset="utf-8"> 3 <title>CSS Transitions Test: transition-property - border-right-color</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-backgrounds-3/#border-color"> 8 <meta name="assert" content="Test checks that the 'border-right-color' property is animatable."> 9 <style> 10 #test { 11 border: 10px solid red; 12 height: 90px; 13 transition-duration: 2s; 14 transition-property: border-right-color; 15 transition-timing-function: linear; 16 width: 90px; 17 } 18 </style> 19 <body> 20 <p>Click the square with red border below. Test passes if the color of right border transforms to green gradually not immediately.</p> 21 <div id="test"></div> 22 <script> 23 (function() { 24 var div = document.querySelector("#test"); 25 div.addEventListener("click", function(evt) { 26 div.setAttribute("style", "border-right-color: green;"); 27 }, false); 28 })(); 29 </script> 30 </body>