تشترك هذه المقالة في الرسوم المتحركة لتحميل Timer Timer Canvas للرجوع إليها. المحتوى المحدد كما يلي
<! doctype html> <html> <head lang = "en"> <meta charset = "utf-8" <title> </title> <style> </style> </head> <body> <canvas id = "canvas"> لا يدعم متصفحك تقنية canvas </canvas> <script c = canvas. var ctx = c.getContext ('2d') ؛ ctx.translate (c.width/2 ، C.Height/2) ؛ // draw first 8 دالة الدوائر ملفوفة بشكل ثابت 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 () ؛ } آخر {ctx.beginpath () ؛ CTX.ARC (0 ، -30 ، 5 ، 0 ، 2 * Math.pi) ؛ ctx.strokestyle = '#000' ؛ ctx.stroke () ؛ } ctx.rotate (math.pi * 45/180) ؛ }} // Turn SetInterval (function () {ctx.clearrect (-c.width/2 ، -c.height ، c.width ، C.Height) ؛ create () ؛ ctx.rotate (math.pi*45/180) ؛} ، 300) ؛ . // </script> </body> </html>ما سبق هو كل محتوى هذه المقالة. آمل أن يكون ذلك مفيدًا لتعلم الجميع وآمل أن يدعم الجميع wulin.com أكثر.