js怎么给直线加箭头
1、首先,两点之间画线也只是连连看最基本功能的一部分,画的线也仅是折线,而且还只能向左折,后面可以根据图片中的位置点来确定折线的方向。

3、然后,输入指令,arrow=document.createElement("line"); arrow.setAttri芟鲠阻缒bute("x1",x1[i]);arrow.setAttribute("y2",y1[i+1]);arrow.setAttribute("stroke","blue"); arrow.setAttribute("stroke-width",2);arrow.setAttribute("style", "stroke-dasharray:6");drawing.appendChild(arrow)。

5、然后画箭头,箭头初始方向为垂直向下,即偏移角度不设置,或设置为0度。// paper: raphael画布,// x, y: 箭头盼内溲铫点位置(x,y),// len: 箭头总长度,// deltaAngle: 箭头从初始垂直向下位置开始的偏移角度,注意:是度数,不是弧度,正数表示顺时针,负数表示逆时针,默认为不偏移,及为0度。
