Change color lines in canvas when mouseover
问题 I have some lines in canvas. I want each single line change color when the mouseover that line but I have some issues with this problem. Is there any JS library to help me solve this problem? Can you help me? Thanks var canvas = document.getElementById('myCanvas'); var context = canvas.getContext('2d'); var width = 400; var height = 400; for(i=0; i<120 ;i+=15){ context.beginPath(); context.moveTo(90+i, 0); context.lineTo(250, 400); context.lineWidth = 1; context.strokeStyle = '#28B9A2';