每天进步一点点:有无逗号的区别

来源:互联网 发布:软件的数据采集 编辑:程序博客网 时间:2024/05/18 03:12

有逗号的代码:


ctx.font="100px,sans-serif";ctx.fillText("hello",10,100);ctx.strokeText("hello",10,100);

结果:

无逗号的代码:

ctx.font="100px sans-serif";ctx.fillText("hello",10,100);ctx.strokeText("hello",10,100);
结果:

感想:仅仅是一个逗号的区别,结果截然不同,编程,果然是一件严肃的事情,容不得一点马虎!

0 0
原创粉丝点击