Dice war logic

This commit is contained in:
2024-08-14 12:09:08 +02:00
parent 7e89d45abc
commit 5b6c5d9431
2 changed files with 73 additions and 3 deletions

View File

@@ -32,10 +32,47 @@ div{
}
button{
margin-top: .5rem;
padding: .5rem;
border: none;
border-radius: 5px;
box-shadow:
inset 2px 2px 5px #ddddddcc,
2px 2px 5px #111;
background: darkblue;
color: #fff;
}
img.pop{
animation: pop 0.2s ease-in-out;
}
.result{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
filter: drop-shadow(1.5px 1.5px 6px #000);
text-transform: uppercase;
font-size: 125px;
}
.won{
color: #0f0;
animation: pop 0,5s ease-in-out;
transition: .5s;
}
.lost{
color: #f00;
animation: pop 0,5s ease-in-out;
transition: .5s;
}
.draw{
color: #ff0;
animation: pop 0,5s ease-in-out;
transition: .5s;
}
@keyframes pop{
0%{
scale: 0.1;
@@ -53,4 +90,7 @@ img.pop{
margin: .75rem;
border-radius: 5px;
}
.result{
font-size: 69px;
}
}