小程序
小游戏
企业微信
微信支付
扫描小程序码分享
ios15默认打开了canvas rendering导致部分网页无法在safari中正常打开,使用web-view会面临同样的情况。但是safari在关闭canvas rendering后即可恢复正常(参考:https://developer.apple.com/forums/thread/684843),但小程序还是会出错。请问这个情况该如何解决?
1 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
你好,iOS15 下, 在 css 中使用系统字体绘制 <canvas> 标签内容,会必然导致 web 进程 terminate, 代码如下
HTML:
<canvas width="200" height="200" id="myCanvas"></canvas>
JS:
const canvas = document.getElementById('myCanvas');
const ctx = canvas.getContext('2d');
ctx.font = '36px -apple-system-font, BlinkMacSystemFont, system-ui, PingFang SC';
ctx.fillStyle = 'rgba(0,0,0,0.3)';
ctx.fillText(‘WeChat’, 50, 50);
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
你好,iOS15 下, 在 css 中使用系统字体绘制 <canvas> 标签内容,会必然导致 web 进程 terminate, 代码如下
HTML:
<canvas width="200" height="200" id="myCanvas"></canvas>
JS:
const canvas = document.getElementById('myCanvas');
const ctx = canvas.getContext('2d');
ctx.font = '36px -apple-system-font, BlinkMacSystemFont, system-ui, PingFang SC';
ctx.fillStyle = 'rgba(0,0,0,0.3)';
ctx.fillText(‘WeChat’, 50, 50);