我希望能够使用.animate绘制带有水平线的箭头( - >) 任何帮助将不胜感激!
答案 0 :(得分:0)
<强>的Javascript 强>
var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.moveTo(10,50);
ctx.lineTo(150,50);
ctx.lineTo(140,40);
ctx.moveTo(150,50);
ctx.lineTo(140,60);
ctx.stroke();
<强> HTML 强>
<canvas id="myCanvas" width="200" height="100" style="border:1px solid red;">
Your browser does not support the HTML5 canvas tag.
</canvas>