var canvas=document.getElementById('myCanvas');
var ctx=canvas.getContext('2d');
ctx.fillStyle='#FF0000';
ctx.fillRect(0,0,80,100);
上面是我在w3c上面拷贝的,在ios8.1.2版本的苹果6上面,cavas画不出内容,求解决办法。
ringa_lee2017-04-17 12:01:49
I haven’t tested it yet, so just give me some suggestions. Apple phones should support it. I don’t know whether you open it on WeChat or use a browser Yes, if you are on WeChat, you can test it in the browser (Safari
) first.
Add a judgment for testing
if (canvas == null) {
//测试
}
Reference standards
迷茫2017-04-17 12:01:49
https://developer.apple.com/s...
No one uses IOS8 anymore. Don't waste your energy.