css - Change cursor over HTML5 Canvas when dragging the mouse -


i have made paint brush type of application using canvas tag . wanted when mouse on canvas cursor changes ,

<canvas id="draw" style="cursor: url(image/pencil.cur)"> 

i have accomplished cant figure out how shall change cursor while drag mouse drawing image

use :active css pseudo-class change cursor when mouse button down on element:

#draw:active {      cursor: url(image/pencil.cur); } 

working example: http://jsfiddle.net/nxv63/


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -