实例介绍
【实例简介】请放到web网站访问 查看效果
【实例截图】
【核心代码】
<!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> <title>幸运大转盘</title> <link rel="stylesheet" type="text/css" href="../css/main.css" /> <style type="text/css"> .demo{width:417px; height:417px; position:relative; margin:50px auto} #disk{width:417px; height:417px; background:url(disk.jpg) no-repeat} #start{width:163px; height:320px; position:absolute; top:46px; left:130px;} #start img{cursor:pointer} </style> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script type="text/javascript" src="jQueryRotate.2.2.js"></script> <script type="text/javascript" src="jquery.easing.min.js"></script> <script type="text/javascript"> $(function(){ $("#startbtn").rotate({ bind:{ click:function(){ var a = Math.floor(Math.random() * 360); $(this).rotate({ duration:3000, angle: 0, animateTo:1440 a, easing: $.easing.easeOutSine, callback: function(){ alert('中奖了!'); } }); } } }); }); </script> </head> <body> <div id="main"> <div class="msg"></div> <div class="demo"> <div id="disk"></div> <div id="start"><img src="start.png" id="startbtn"></div> </div> </div> </body> </html>
标签: lottery
好例子网口号:伸出你的我的手 — 分享!
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
网友评论
我要评论