Animation javascript dans page web
1) Etape 1 <!DOCTYPE html> <html lang="fr"> <head> <meta charset="UTF-8"> <title>Branche simple</title> <style> body { margin: 0; background: #f4f4f4; } canvas { display: block; margin: auto; background: white; border: 1px solid #ccc; } </style> </head> <body> <canvas id="canvas" width="400" height="400"></canvas> <script> const ctx = document.getElementById('canvas').getContext('2d'); ctx.strokeStyle = 'green'; ctx.lineWidth = 4; ctx.beginPath(); ctx.moveTo(200, 400); ctx.lineTo(200, 300); ctx.stroke(); </script> </body> </html> 2) Etape 2: <!DOCTYPE html> <ht...