玉宇雯华
2016-05-25 20:30
<body>
<canvas id="canvas" width="1024" height="768"style="border:1px solid#aaa:display:block:margin:50px auto;">
</canvas>
<script>
window.onload=function(){
var canvas=document.getElementById ("canvas");
canvas.width=1024;
canvas.height=768;
var context=canvas.getContext("2d")
context.moveTo(100,100)
context.lineTO(700,700)
context.stroke()
}
</script>
</body>
颜色后面是;
hah
lineTo();
o是小写!!
炫丽的倒计时效果Canvas绘图与动画基础
96756 学习 · 1000 问题
相似问题
回答 2
回答 2