先看看最简单的效果图: 代码如下: JavaScript Code复制内容到剪贴板 var canvas = document.getElementById(‘my’), ctx = canvas.getContext(‘2d’); setInterval(function(){ ctx.clearRect(0,0,400,400); ctx.save(); ctx.translate(200,200); var ci =90, pi = Math.PI / ci, x1 = 1