文章标题

来源:互联网 发布:seo外包北京华网 编辑:程序博客网 时间:2024/06/06 00:16

转盘游戏代码



成功抵达


下注试试运气吧


赢者可兑换《澳门风云2》影票



选择点数:1-36
1~6
7~12
13~18
19~24
25~30
31~36

标题

        </div>        <div id="roulette_wheel">            <div id="Game_pointer">                <img src="img/3375_1453854403.png" alt="" />            </div>        </div>        <div id="bottom_pour">            <img src="img/1093_1453854255.png" alt="" />        </div>        <div id="prize">            <img src="img/layer_prize.png" alt="" />        </div>        <div id="no_prize">            <img src="img/layer_prize_none.png" alt="" />        </div>    </div>    <!---------------------转盘游戏------结束------------>    #Game_wrap{width:6.4rem;background:url(../img/page5_bg.jpg) no-repeat;background-size:100% 100%;display: none;

}

Game_wrap img{width: 100%;}

Game_wrap_top{

width: 6.4rem;text-align: center;color: white;padding-top:1rem;

}

Game_wrap_top>h2{

font-size:36px;line-height:2em;

}

Game_wrap_top>p:nth-child(2){

font-size: 20px;line-height: 1.5em;

}

Game_wrap_top>p:nth-child(3){

font-size:14px;line-height: 1.5em;

}

roulette_wheel{

width:4.05rem;height: 4.05rem;margin: 0 auto;background: url(../img/8696_1453854253.png);background-repeat: no-repeat;background-size:100% 100%;position:relative;

}

Game_pointer{

width: 0.42rem;height:3.95rem;position:absolute;top: 0.05rem;left:50%;margin-left: -0.21rem;transform-origin:center center;transform:rotate(2deg);transition:transform 3s ease-in-out;

}

Game_pointer>img{

width:0.41rem;height: 0.83rem;position: absolute;bottom:0;left:0;

}

Game_wrap_top select{

width:4.2rem;height: 0.61rem;margin: 0.5rem 0 0.8rem;font-size:0.24rem;color: #a82d2a;text-indent: 0.2rem;background: url(../img/4814_1453854252.png) no-repeat;background-size:100%;appearance: none;border: none;outline: none;border-radius:0;

}

bottom_pour{

width:2.84rem;height:0.66rem;margin:0.5rem auto 2rem;

}

prize,#no_prize{

width:6.4rem;display: none;position:absolute;top: 0;left: 0;bottom: 0;right: 0;margin: auto;

}
//随机使每次旋转在 5~10圈
function Random(min, max) {
return degNum = parseInt(Math.random() * (max - min + 1) + min);
}
var circleNum = 0;
//下注点击事件
(“#bottom_pour”).on(“touchstart”, function() {  
    circleNum += Random(185, 370);  
    $(“#Game_pointer”).css(‘transform’, ‘rotate(’ + (circleNum * (360 / 37) - (180 / 37 + 1)) + ‘deg)’);  
    var index = circleNum % 37;  
    JudgePrice(index)  
});  
//转盘数字中奖数组  
var arr = [20, 14, 31, 9, 22, 18, 29, 7, 28, 12, 35, 3, 26, 0, 32, 15, 19, 4, 21, 2, 25, 17, 34, 6, 27, 13, 36, 11, 30, 8, 23, 10, 5, 24, 16, 33, 1];  
function prizeHandle(bol){  
    setTimeout(function(){  
        if(bol == “1”) {  
            $(“#prize”).show();  
        } else {  
            $(“#no_prize”).show();  
        }  
    }, 4000);  
}  
function JudgePrice(x) {  
    var aa = $(“#Game_select option:selected”).val() * 6;  
    var a = arr[x] <= aa && arr[x] >= aa - 5 ? 1 : 0;  
    prizeHandle(a);  
}
(“#no_prize”).on(“touchstart”, function() {
(“#no_prize”).hide();  
})
(“#prize”).on(“touchstart”, function() {
$(“#prize”).hide();
})重点内容

0 0
原创粉丝点击