开发者社区> 问答> 正文

canvas 中translate问题 ?报错

var canvas = document.getElementById('canvas');
var c = canvas.getContext('2d');
c.width = SCREEN_WIDTH;
c.height = SCREEN_HEIGHT;
// c.translate(HALF_WIDTH, HALF_HEIGHT);

c.translate3d(HALF_WIDTH,HALF_HEIGHT,10);

c.translate起作用了

c.translate3d出错:Uncaught TypeError: undefined is not a function

不是有translate3d么?为什么会报错

展开
收起
爱吃鱼的程序员 2020-06-14 18:20:09 591 0
0 条回答
写回答
取消 提交回答
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载