Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Canvas demo</title>
- <style type="text/css">
- #canvasSection{
- position:fixed;
- top:0;
- left:0;
- }
- </style>
- <script type="text/javascript">
- function draw()
- {
- var canvas = document.getElementById('canvasSection');
- var ctxSquare = canvas.getContext('2d');
- ctxSquare.fillStyle='#999999';
- ctxSquare.fillRect(0, 0,30,30);
- }
- </script>
- </head>
- <body onLoad="draw()">
- <canvas id="canvasSection">Error, canvas is not supported</canvas>
- <div style="z-index:1">TestText</div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement