clipping-4-canvas.html 323 B

123456789101112131415
  1. <!DOCTYPE HTML>
  2. <title>Test for clipping of border-radius</title>
  3. <style>
  4. canvas {
  5. border-radius: 25px;
  6. }
  7. </style>
  8. <canvas id="canvas" height="100" width="200"></canvas>
  9. <script>
  10. var canvas = document.getElementById("canvas");
  11. var cx = canvas.getContext("2d");
  12. cx.fillStyle="lime";
  13. cx.fillRect(0, 0, 200, 100);
  14. </script>