Files
PetPet/Games/DiceWar/style.css

96 lines
1.6 KiB
CSS

*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
min-height: 100vh;
background-color: #333;
color: #fff;
text-align: center;
}
img{
width: 100px;
height: 100px;
margin: 1rem;
border-radius: 10px;
filter: drop-shadow(1.5px 1.5px 6px #aaa);
}
div{
min-height: 50vh;
min-width: 100dvw;
background-color: var(--clr);
display: flex;
justify-content: space-around;
align-items: center;
flex-direction: column;
}
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;
}
100%{
scale: 1;
}
}
@media screen and (max-width: 500px){
img{
width: 40px;
height: 40px;
margin: .60rem;
border-radius: 5px;
}
.result{
font-size: 69px;
}
}