Concentric Circles - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Concentric Circles</title> <style> body, html { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #8B4513; display: flex; justify-content: center; align-items: center; } canvas { display: block; } </style> </head> <body> <canvas id="canvas"></canvas> <script> const canvas = document.getElementById('canvas'); const ctx = canvas.getContext('2d'); resizeCanvas(); window.addEventListener('resize', resizeCanvas); function resizeCanvas() { canvas.width = window.innerWidth; canvas.height = window.innerHeight; draw(); } function draw() { const width = canvas.width; const height = canvas.height; ctx.fillStyle = '#8B4513'; ctx.fillRect(0, 0, width, height); ctx.strokeStyle = '#A0522D'; ctx.lineWidth = 2; for (let y = 0; y < height; y += 100) { for (let x = 0; x < width; x += 100) { ctx.beginPath(); for (let r = 10; r < 50; r += 10) { ctx.moveTo(x + r, y); ctx.arc(x, y, r, 0, 2 * Math.PI); } ctx.stroke(); } } } draw(); </script> </body> </html>