Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Full-Screen Orange Canvas</title>
- <style>
- body, html {
- margin: 0;
- padding: 0;
- overflow: hidden;
- }
- canvas {
- display: block;
- }
- </style>
- </head>
- <body>
- <canvas id="orangeCanvas"></canvas>
- <script>
- const canvas = document.getElementById('orangeCanvas');
- const context = canvas.getContext('2d');
- // Set canvas size to fill the screen
- canvas.width = window.innerWidth;
- canvas.height = window.innerHeight;
- // Fill canvas with orange color
- context.fillStyle = 'orange';
- context.fillRect(0, 0, canvas.width, canvas.height);
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement