微信公众平台开发 微信公众平台开发模式 企业微信公众平台 刮刮乐
作者:方倍工作室
地址:http://www.cnblogs.com/txw1958/p/weixin-55-ScratchTicket.html
刮刮乐开发
使用插件wScratchPad.js
A jQuery plugin to mimic a scratch card or pad behaviour. Allowing you to scratch off an overlay as either a color or image.
![](https://images0.cnblogs.com/blog/340216/201308/06142846-cabd2f21482d462cae62d6f229d07fe0.jpg)
<!DOCTYPE html> <html> <head> <meta CHARSET="UTF-8"> <title>刮刮乐</title> <script type="text/javascript" src="./inc/jquery.1.8.2.min.js"></script> <script type="text/javascript" src="./wScratchPad.js"></script> </head> <div id="wScratchPad3" style="display:inline-block; position:relative; border:solid black 1px;"></div> <script type="text/javascript"> $("#wScratchPad3").wScratchPad({ cursor:'./cursors/mario.png', scratchMove: function(e, percent) { if(percent > 70) this.clear(); }, }); </script> </body> </html>
=============================================================
欢迎关注方倍工作室微信,了解我们及行业的最新动态