jquery实现手机端移动端抢红包效果代码
代码语言:html
所属分类:红包
代码描述:jquery实现手机端移动端抢红包效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" id="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.5, maximum-scale=1" /> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script> <script> (function () { var five = new Image(); //5 five.src = "//repo.bfw.wiki/bfwrepo/image/60d9bb7dd08dc.png"; var ten = new Image(); //100 ten.src = "//repo.bfw.wiki/bfwrepo/image/60d9bb8c0b48c.png"; var empty = new Image(); //空的 empty.src = "//repo.bfw.wiki/bfwrepo/image/60d9bba118803.png"; var zad = new Image(); //炸弹 zad.src = "//repo.bfw.wiki/bfwrepo/image/60d9bbe819c12.png"; var moneyEnum = { five: { image: five, speed: 8, value: 5, widths: 127, heights: 143, }, ten: { image: ten, speed: 10, value: 10, widths: 127, heights: 143, }, empty: { image: empty, speed: 8, value: 0, widths: 127, heights: 143, }, zad: { image: zad, speed: 8, value: -10, widths: 83, heights: 71, } }; var money = function (x, type) { this.x = x; this.y = 0; this.type = type; this.status = 0; //0正在掉落,1接住 ,2没接住 this.widths = moneyEnum[this.type].widths; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0