Skip to content

Commit

Permalink
三等奖基本完成
Browse files Browse the repository at this point in the history
  • Loading branch information
Weslie0803 committed Oct 28, 2022
1 parent c5ceac8 commit 0b503b0
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
10 changes: 8 additions & 2 deletions animate.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
12 changes: 10 additions & 2 deletions change.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)");
}
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</div>
<div id="container" class="container">
<div id="stage" style="transform: translateZ(-380px);">
<div id="shape" class="ringNum backfaces cubeShow_114514">
<div id="shape" class="cube backfaces cubeShow_114514">
<div id="card0" class="plane one"> <img src="抽奖软件UI/数字/1.png"></div>
<div id="card1" class="plane two"> <img src="抽奖软件UI/数字/2.png"></div>
<div id="card2" class="plane three"><img src="抽奖软件UI/数字/3.png"></div>
Expand Down
9 changes: 3 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand Down Expand Up @@ -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){
Expand Down

0 comments on commit 0b503b0

Please sign in to comment.