diff --git a/animate.css b/animate.css index aec1076..85bac71 100644 --- a/animate.css +++ b/animate.css @@ -220,13 +220,19 @@ background-repeat: no-repeat; width: 50px; height: 50px; - animation: BondFlash 2s linear infinite; + animation: BondFlash 3s linear infinite; } #result { - margin: 0; + margin: auto; transition: transform 2s; transform-style: preserve-3d; + left: 0; + right:0; + top: 0; + bottom: 0; + width: 320px; + height: 580px; } #result>.CardUndefined>img { diff --git a/change.js b/change.js index adee1f5..c90f8ec 100644 --- a/change.js +++ b/change.js @@ -1,6 +1,15 @@ +var toggleThirdPrize = function () { + $(".row").css("display", "none"); + $("#result").parent().css("transform", "translateY(2500px)"); + $("#result").css("display", "none"); + $("#bg0").parent().parent().css("transform", "translateY(0px) translateZ(-250px)"); + $("#bond0").parent().parent().css("transform", "translateY(0px) translateZ(-250px)"); + $("#card0").parent().parent().css("transform", "translateY(0px) translateZ(-380px)"); +} var toggleExpand = function(){ //TODO $("#bg0").parent().toggleClass("ring8card").toggleClass("ring8card2"); + $("#card0").parent().toggleClass("ringNum").toggleClass("cube"); } var toggleResult = function(num){ //TODO @@ -9,6 +18,5 @@ var toggleResult = function(num){ $("#card0").parent().parent().css("transform", "translateY(-1000px)"); $("#n1").attr("src", "抽奖软件UI/数字/"+num+".png") $("#result").css("display"," block"); - $("#result").css("transform"," translateZ(-1000px)"); - $("#result").css("transform"," translateZ(0)"); + $("#result").parent().css("transform"," translateY(0)"); } diff --git a/index.html b/index.html index 8da7914..914ed29 100644 --- a/index.html +++ b/index.html @@ -47,7 +47,7 @@
-
+
diff --git a/index.js b/index.js index d2c7938..5abfffd 100644 --- a/index.js +++ b/index.js @@ -148,12 +148,6 @@ $(document).ready(function () { $("#num2").css("display", "inherit"); $(".container").css("max-width", "730px"); $(".col-xs-4").css("width", "50%"); - } - var toggleThirdPrize = function () { - $(".row").css("display", "none"); - $("#result").css("display", "none"); - $("#result").css("transform", "translateZ(-500px)"); - //TODO } // Lottery var usedArr = []; @@ -215,7 +209,10 @@ $(document).ready(function () { pressTimes++; } else if(event.which === 32 && pressTimes === 2){ // 重置 + toggleExpand(); toggleThirdPrize(); + clearNum(numArr); + numArr = getRandomNum(usedArr, config[0], config[1], config[2]); pressTimes = 0; } } else if(prize === 2){