var elementStyle = window.getComputedStyle(canvas, null),
w = parseInt( elementStyle['width'].replace('px','') ),
h = parseInt( elementStyle['height'].replace('px','') );
canvas.width = w;
canvas.height = h;
获取 style 属性
相关推荐
评论
暂无评论...