这是一款html5手机红包抽奖效果,你可以简单的应用在活动抽奖上,比如双十一咯。点击红包摇一摇,看看中了什么大奖,千万别找素材圈要哦。
淘建站为您提供更多_html5_摇一摇_抽奖_摇一摇,在此特别感谢您对我们的支持与厚爱!
演示不了,点击反馈
下载 270 次
觉得不错,可打赏下作者
免费共享
html
<div class="red">
<button class="redbutton" type="领取红包">拆红包</button>
<div class="red-jg">
<h1>恭喜您!</h1>
<h5>获得iPhone 6plus 64g手机一部</h5>
</div>
</div>
<div class="t-btn">
<button>立即领取</button>
</div>// 点击redbutton按钮时执行以下全部
$('.redbutton').click(function(){
// 在带有red样式的div中添加shake-chunk样式
$('.red').addClass('shake-chunk');
// 点击按钮2000毫秒后执行以下操作
setTimeout(function(){
// 在带有red样式的div中删除shake-chunk样式
$('.red').removeClass('shake-chunk');
// 将redbutton按钮隐藏
$('.redbutton').css("display" , "none");
// 修改red 下 span 背景图
$('.red > span').css("background-image" , "url(img/red-y.png)");
// 修改red-jg的css显示方式为块
$('.red-jg').css("display" , "block");
},2000);
});

