SongHb
2014-08-28 13:53:39
jquery实现微信刮刮乐特效源代码下载
wScratchPad是jQuery上的一个插件,它能模拟出刮的行为,使你能“擦去”一层覆盖物,这层覆盖物既可是一个图片,也可以是某种颜色涂层。
官方网址为 http://wscratchpad.websanova.com/
配置选项:
$('#elem').wScratchPad({ size : 5, // The size of the brush/scratch. bg : '#cacaca', // Background (image path or hex color). fg : '#6699ff', // Foreground (image path or hex color). realtime : true, // Calculates percentage in realitime. scratchDown : null, // Set scratchDown callback. scratchUp : null, // Set scratchUp callback. scratchMove : null, // Set scratcMove callback. cursor : 'crosshair' // Set cursor. });
示例
包含头文件:
<script type="text/javascript" src="./wScratchPad.min.js"></script>
Percent scratched
$("#elem").wScratchPad({ scratchDown: function(e, percent){ console.log(percent); }, scratchMove: function(e, percent){ console.log(percent); }, scratchUp: function(e, percent){ console.log(percent); } });
Update on the Fly
var sp = $("#elem").wScratchPad(); sp.wScratchPad('size', 5); sp.wScratchPad('cursor', 'url("./cursors/coin.png") 5 5, default'); // Or directly with element. $("#elem").wScratchPad('image', './images/winner.png');
Methods
$('#elem').wScratchPad('reset'); $('#elem').wScratchPad('clear'); $('#elem').wScratchPad('enabled', <boolean>);
有图有真相
这是demo
配合其他图片
猜你喜欢
- jquery炫酷地图特效样式
- 中秋特供:中秋快乐!html5+canvas+jquery实现烟花效果
- jquery特效集锦 包含多种插件展示效果
- Ajax+JQuery留言特效
- 15个经典jQuery Demo(适合初学者)
- jquery实现鼠标移动到图片上缩小图片并显示图片说明特效源代码下载
- 75款常用的jquery特效前端网页代码
- jQuery制作鼠标悬停水平滑动门切换特效仿阿里妈妈联盟广告切换特效
- jquery实现可切换主题的注册表单特效
- jquery banner广告图特效代码
- jquery特效大全,jquery+css+css3+html+html5的特效制作
- jquery实现手机验证码倒计时效果
请下载代码后再发表评论
文件名:微信刮刮乐源码.rar,文件大小:297.809K
下载
- /
- /cursors
- /cursors/Thumbs.db
- /cursors/bird.png
- /cursors/coin.png
- /cursors/god-sword.png
- /cursors/leaf.png
- /cursors/mario.png
- /images
- /images/scratch-to-win.png
- /images/slide1.jpg
- /images/slide2.jpg
- /images/slide3.jpg
- /cursors


SZEPEZS LV9
2024年3月8日
ZN_0316 LV1
2021年6月23日
142777813 LV1
2020年5月31日
wangyanbin LV7
2019年3月20日
1792312911 LV17
2018年6月22日
q504721053 LV5
2018年5月6日
tian1234 LV18
2017年9月17日
564311694 LV1
2017年6月1日
jjljldjsl LV1
2017年3月10日
namo99 LV1
2017年3月9日

SZEPEZS LV9
2024年3月8日
wxy0309 LV6
2023年5月30日
高腾达 LV3
2023年5月22日
dh03240309 LV2
2023年2月15日
夜上清元 LV8
2022年6月16日
微信网友_5917684846972928 LV2
2022年4月15日
abcdljw LV20
2021年12月28日
二十一画 LV10
2021年11月14日
ZN_0316 LV1
2021年6月23日
dwadawd LV7
2021年6月16日