一、线条的帽子lineCap 取值:butt(默认值),round圆头,square方头 var canvas=document.getElementById("canvas"); canvas.width=800; canvas.height=800; var context=canvas.getContext("2d"); context.lineWidth=40; context.strokeStyle="#005588"; //三个beginpath()画了3条平行线 context.beginPath(); context.moveTo(100,200); context.line