代码拉取完成,页面将自动刷新
同步操作将从 Rattenking/LuckDraw 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="email=no" name="format-detection">
<meta content="telephone=no" name="format-detection">
<meta name="msapplication-tap-highlight" content="no">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
<link rel="shortcut icon" href="http://www.tyfo.com/market/content/home_image/favicon.ico" type="image/x-icon" />
<title>转盘抽奖</title>
<script src="http://www.tyfo.com/common/js/jquery-1.11.1.min.js"></script>
<style>
p,body{margin: 0;}
.rui-luck-draw{
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
left: 0;
}
.rui-luck-content{
height: 75vw;
width: 75vw;
max-width: 550px;
max-height: 550px
}
.rui-luck-turntable,.rui-luck-pointer{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%) rotate(0deg);
transform-origin: center center;
-webkit-transform-origin: center center;
-moz-transform-origin: center center;
-ms-transform-origin: center center;
-o-transform-origin: center center;
}
.rui-luck-name{
font-size: 16px;
text-align: left;
height: 30px;
line-height: 30px;
position: fixed;
top: 0;
left: 0;
z-index: 100;
}
.rui-luck-name a{
text-decoration: none;
color: #777;
padding: 0 20px;
}
.rui-luck-pointer{
width: 27vw;
height: 27vw;
max-width: 205px;
max-height: 205px
}
</style>
</head>
<body>
<div class="rui-luck-draw">
<div class="rui-luck-name">
<p><a href="./index.html">转盘抽奖之指针旋转抽奖</a></p>
<p><a href="./prize.html">九宫格抽奖</a></p>
<p><a href="./turntable.html">转盘抽奖之转盘旋转抽奖</a></p>
</div>
<div class="rui-luck-content">
<div class="rui-luck-box">
<img id="luckTurntable" src="./images/turntable.png" alt="" class="rui-luck-content rui-luck-turntable">
<img id="luckPointer" onclick="startRotate(this)" src="./images/pointer.png" class="rui-luck-pointer"/>
</div>
</div>
</div>
<script src="./luckDraw.js"></script>
<script>
// 指针旋转,从右向左顺时针计算奖品
var luckArr = ['100减99优惠券','谢谢参与','59减15优惠券','谢谢参与','39减10优惠券','谢谢参与'];
var luck = new LuckDraw();
var startRotate = function(elem){
luck._init({
rotateId: '#luckPointer',
luckNumber: Math.floor(Math.random() * (5 - 0) + 0),
typeNumber: 6,
time: 2000,
type: 'turntable',
circleNumber: 10,
success: function(res){
console.log(res.luckNumber);
console.log(luckArr[res.luckNumber]);
alert(luckArr[res.luckNumber]);
}
});
}
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。