canvas

共找到 1 篇文章

1 篇文章
1 分钟阅读
1500 字数

canvas requestAnimationFrame画一个clock

canvas requestAnimationFrame 画一个 clock 🔗 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame; var h1 = document.getElementsByTagName("h1")[0]; var canvas = document.getElementById("canvas"); var ctx