admin管理员组文章数量:1313347
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.
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.
Share Improve this question asked Aug 10, 2012 at 14:07 James AndrewJames Andrew 7,24314 gold badges48 silver badges62 bronze badges 2- Also if there's a HTML5 alternative please tell me :) – James Andrew Commented Aug 10, 2012 at 14:08
- 2 Something knocked up in canvas would be your best bet for this sort of thing. – Mitya Commented Aug 10, 2012 at 14:09
2 Answers
Reset to default 6Use html5 canvas element.
Checkout this fiddle for an example: http://jsfiddle/ArtBIT/WUXDb/1/
jQuery Plugin: http://www.senamion./blog/jScratchcard.html
HTML5: http://www.catchmyfame./2011/06/28/a-jquery-canvas-scratch-off/
本文标签: Javascript erase image with cursorStack Overflow
版权声明:本文标题:Javascript erase image with cursor - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741946186a2406427.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论