Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/119.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 画布线至无法工作的IOS/IPAD_Javascript_Ios_Html_Canvas - Fatal编程技术网

Javascript 画布线至无法工作的IOS/IPAD

Javascript 画布线至无法工作的IOS/IPAD,javascript,ios,html,canvas,Javascript,Ios,Html,Canvas,嘿,我用画布画了一个简单的点 ctx.lineWidth = 5; ctx.lineJoin = 'round'; ctx.lineCap = 'round'; ctx.strokeStyle = 'blue'; ctx.beginPath(); //ctx.moveTo(last_mouse.x, last_mouse.y); ctx.lineTo(120, 40); 但它并没有在IOS上显示圆点,只是在Android/Windows上显示你

嘿,我用画布画了一个简单的点

    ctx.lineWidth = 5;
    ctx.lineJoin = 'round';
    ctx.lineCap = 'round';
    ctx.strokeStyle = 'blue';
 ctx.beginPath();
        //ctx.moveTo(last_mouse.x, last_mouse.y);
ctx.lineTo(120, 40);

但它并没有在IOS上显示圆点,只是在Android/Windows上显示你的代码并没有为我在任何浏览器上绘制任何东西

我在末尾添加了一个适当的moveTo和一个stroke,下面是示例:


var canvas=document.getElementById('canvas');
var ctx=canvas.getContext('2d');
ctx.lineJoin=ctx.lineCap='round';
//在画布中间画一个蓝点
ctx.beginPath();
ctx.lineWidth=50;
ctx.strokeStyle='蓝色';
ctx.lineTo(canvas.width/2,canvas.height/2);
ctx.stroke();
//在画布上画一条红色对角线
ctx.beginPath();
ctx.lineWidth=5;
ctx.strokeStyle=‘红色’;
ctx.moveTo(20,20);
ctx.lineTo(canvas.width-20,canvas.height-20);
ctx.stroke();

它在iOS上不显示do,但在Android/iOS上显示????请更正您的问题。它在IOS上不显示点IPAD@HelderSepu所有平台中的Chrome