Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <body bgcolor="000000">
- <canvas id="myCanvas" width="300" height="300" style="border:1px solid #d3d3d3;">
- Your browser does not support the HTML5 canvas tag.</canvas>
- <script>
- var c = document.getElementById("myCanvas");
- var ctx = c.getContext("2d");
- // Fill with gradient
- ctx.fillStyle ="red"
- ctx.fillRect(20,40,250,800);
- ctx.fillStyle =""
- ctx.fillStyle ="white"
- ctx.fillRect(50,40,250,800)
- ctx.fillStyle ="yellow"
- ctx.fillRect(80,40,250,800)
- ctx.fillStyle ="blue"
- ctx.fillRect(120,40,250,800)
- ctx.fillStyle ="magenta"
- ctx.fillRect(150,40,250,800)
- ctx.fillStyle ="limegreen"
- ctx.fillRect(180,40,250,800)
- ctx.fillStyle ="black"
- ctx.fillRect(210,40,250,800)
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement