linear-percent-ref.html 514 B

123456789101112131415161718192021222324
  1. <html xmlns="http://www.w3.org/1999/xhtml"
  2. class="reftest-wait">
  3. <head>
  4. <script>
  5. function doDraw() {
  6. var ctx = document.getElementById('canvas').getContext('2d');
  7. var grad = ctx.createLinearGradient(30,60,300,60);
  8. grad.addColorStop(0, '#0000ff');
  9. grad.addColorStop(1, '#000000');
  10. ctx.fillStyle = grad;
  11. ctx.fillRect(0,0,300,300);
  12. document.documentElement.removeAttribute('class');
  13. }
  14. </script>
  15. </head>
  16. <body onload="doDraw();">
  17. <canvas id="canvas" width="300" height="300"/>
  18. </body>
  19. </html>