createLinearGradient

发布于 8 年前作者 xia8915497 次浏览最后编辑 8 年前来自 ask

安卓手机绘图调用一次   

const grd = ctx.createLinearGradient(this.width/2, this.marginTop, this.width/2, this.height)
grd.addColorStop(0, ‘#fe9947’)
grd.addColorStop(1, ‘#ffddbf’)

ctx.setFillStyle(grd);

 ctx.beginPath();

之后

ctx.setFillStyle(‘#ffffff’);

不管设置什么颜色全部无效

苹果手机没问题

0 回复
暂无回复