Is it possible with javascript?
I'm trying to implement a scratchcard type thing, and I was wondering if the user could 'scratch it' with his cursor and then javascript would remove/erase the image to show the text below.
But i've not been able to find anything (javascript wise) which can erase abit (cursor location) of an image.
Does anyone have any suggestions/ideas?
Thanks.
Use html5 canvas element.
Checkout this fiddle for an example: http://jsfiddle.net/ArtBIT/WUXDb/1/
来源:https://stackoverflow.com/questions/11903404/javascript-erase-image-with-cursor