PHP幸運大轉盤源碼,支持ThinkPHP
<!DOCTYPE HTML>
<html>
<head>
<meta charset=
"utf-8"
>
<meta name=
"keywords"
content=
"幸運大轉盤,cnsecer.com"
/>
<meta name=
"description"
content=
"幸運大轉盤"
/>
<title>幸運大轉盤</title>
<style type=
"text/css"
>
.demo{width:417px; height:417px; position:relative; margin:50px auto}
#disk{width:417px; height:417px; background:url(__STATIC__/images/disk.jpg) no-repeat}
#start{width:163px; height:320px; position:absolute; top:46px; left:130px;}
#start img{cursor:pointer}
</style>
<script src=
"http://cdn.bootcss.com/jquery/1.11.0/jquery.min.js"
></script>
<script type=
"text/javascript"
src=
"__STATIC__/js/jQueryRotate.2.2.js"
></script>
<script type=
"text/javascript"
src=
"__STATIC__/js/jquery.easing.min.js"
></script>
<script type=
"text/javascript"
>
$(
function
(){
$(
"#startbtn"
).click(
function
(){
lottery();
});
});
function
lottery(){
$.ajax({
type:
'POST'
,
url:
'{:U(\'game/run\')}'
,
//提交地址 改為你自己的
dataType:
'json'
,
cache: false,
error:
function
(){
alert(
'出錯了!'
);
return
false;
},
success:
function
(json){
$(
"#startbtn"
).unbind(
'click'
).css(
"cursor"
,
"default"
);
var
a = json.angle;
//角度
var
p = json.prize;
//獎項
$(
"#startbtn"
).rotate({
duration:3000,
//轉動時間
angle: 0,
animateTo:1800+a,
//轉動角度
easing: $.easing.easeOutSine,
callback:
function
(){
var
con = confirm(
'恭喜你,中得'
+p+
'\n還要再來一次嗎?'
);
if
(con){
lottery();
}
else
{
return
false;
}
}
});
}
});
}
</script>
</head>
<body>
<div id=
"main"
>
<div
class
=
"msg"
></div>
<div
class
=
"demo"
>
<div id=
"disk"
></div>
<div id=
"start"
><img src=
"__STATIC__/images/start.png"
id=
"startbtn"
></div>
</div>
</div>
<div id=
"footer"
>
</div>
</body>
</html>
推薦文章
2025-01-18
2024-11-28
2024-11-09
2024-10-25
2024-06-25
2024-01-04
2023-11-06
2023-10-30
2023-10-13
2023-10-10
穩定
產品高可用性高并發貼心
項目群及時溝通專業
產品經理1v1支持快速
MVP模式小步快跑承諾
我們選擇聲譽堅持
10年專注高端品質開發