2种jQuery 实现刮刮卡效果

2022-01-13,,

这篇文章主要介绍了2种jQuery 实现刮刮卡效果,需要的朋友可以参考下

其中拖拽刮涂层效果使用jquery UI的draggable方法

以下是源代码:

复制代码 代码如下:
 
 
 
 jQuery UI模拟刮彩票涂层显示结果
 
 
 #keleyi{width:200px;height:20px;position:relative;text-align:center;font-size:12px;overflow:hidden;background:#eee;}
 #keleyi div{position:absolute;top:0px;left:0px;width:100%;height:20px;background:#ccc;}
 #layout2{width:200px;height:20px;position:relative;text-align:center;font-size:12px;overflow:hidden;background:#eee;}
 #layout2 div{position:absolute;top:0px;right:0px;width:100%;height:20px;background:#ccc;}
 
 
 
 
 
 
 说明:不支持IE6!
 

 

效果一(拖拽灰条):

 
 
 请完全刮开查看中奖结果。
 
 

 

效果二(点击灰条):

 
 
 请完全刮开查看中奖结果。
 
 

 
 

这里给大家分享的是十分常用的刮奖的特效代码,希望小伙伴们能够喜欢。

以上就是2种jQuery 实现刮刮卡效果的详细内容,更多请关注本站其它相关文章!

《2种jQuery 实现刮刮卡效果.doc》

下载本文的Word格式文档,以方便收藏与打印。