Este artículo comparte la animación de carga dinámica del temporizador de lienzo para su referencia. El contenido específico es el siguiente
<! Doctype html> <html> <head lang = "en"> <meta charset = "utf-8"> <title> </title> <style> </yle> </head> <body> <canvas id = "canvas"> su navegador no admite tecnología de lata </ Canvas> <Script> var c = document.getElementByid ('' '' '' Canvas '); var ctx = c.getContext ('2d'); ctx.translate (C.Width/2, C.Height/2); // primero dibujar 8 funciones de círculos envueltos estáticamente create () {for (var i = 1; i <9; i ++) {if (i == 1) {ctx.beginpath (); ctx.arc (0, -30, 5, 0, 2 * math.pi); ctx.fillstyle = '#f0f'; ctx.fill (); } else {ctx.beginpath (); ctx.arc (0, -30, 5, 0, 2 * math.pi); ctx.strokestyle = '#000'; ctx.stroke (); } ctx.rotate (math.pi * 45 /180); }} // Switch setInterval (function () {ctx.clearrect (-c.width/2, -c.height, c.width, c.height); create (); ctx.rotate (math.pi*45/180);}, 300); // Cerrar temporalmente Loading SetTimeOut (function () {C.style.display = 'Ninguno';}, 12200); // </script> </body> </html>Lo anterior es todo el contenido de este artículo. Espero que sea útil para el aprendizaje de todos y espero que todos apoyen más a Wulin.com.