mirror of
https://github.com/MrEidam/PetPet.git
synced 2026-04-17 15:43:31 +00:00
197 lines
3.2 KiB
CSS
197 lines
3.2 KiB
CSS
@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
|
|
*{
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
font-family: 'Ubuntu', sans-serif;
|
|
text-align: center;
|
|
/*border: red 5px solid;*/
|
|
user-select: none;
|
|
}
|
|
body{
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
flex-direction: column;
|
|
min-height: 100vh;
|
|
background: #333;
|
|
background-image: url('./pc.jpg');
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
background-size: cover;
|
|
}
|
|
|
|
#home{
|
|
position: fixed;
|
|
right: 0;
|
|
bottom: 0;
|
|
height: 50px;
|
|
width: 50px;
|
|
border-radius: 25px 0 0 0;
|
|
background: #555;
|
|
}
|
|
|
|
#reset{
|
|
position: fixed;
|
|
left: 0;
|
|
bottom: 0;
|
|
height: 50px;
|
|
width: 50px;
|
|
border-radius: 0 25px 0 0;
|
|
background: #d55;
|
|
border: none;
|
|
}
|
|
|
|
#board{
|
|
width: 372px;
|
|
height: 372px;
|
|
|
|
background: #cdc1d5;
|
|
border: 6px solid #bbada0;
|
|
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.tile{
|
|
position: relative;
|
|
|
|
width: 90px;
|
|
height: 90px;
|
|
border: 5px solid #bbada0;
|
|
|
|
font-size: 40px;
|
|
font-weight: bold;
|
|
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
|
|
transition: transform 0.15s ease-in-out, background-color 0.15s ease-in-out; /* Add smooth transitions */
|
|
}
|
|
|
|
.tile.new-tile{
|
|
animation: pop 0.2s ease-in-out;
|
|
}
|
|
|
|
@keyframes pop{
|
|
0%{
|
|
transform: scale(0.5);
|
|
}
|
|
100%{
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: 500px){
|
|
body{
|
|
background-image: url("./mobile.jpg");
|
|
}
|
|
#board{
|
|
width: 246px;
|
|
height: 246px;
|
|
border: 3px solid #bbada0;
|
|
}
|
|
.tile{
|
|
height: 60px;
|
|
width: 60px;
|
|
border: 3px solid #bbada0;
|
|
}
|
|
}
|
|
|
|
.cash{
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
background: #222222cc;
|
|
padding: .5rem;
|
|
border-radius: 0 0 1rem 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
justify-content: space-evenly;
|
|
align-items: center;
|
|
color: #fff;
|
|
}
|
|
|
|
.cash img{
|
|
margin-right: .5rem;
|
|
aspect-ratio: 1/1;
|
|
object-fit: contain;
|
|
}
|
|
|
|
.coins{
|
|
position: absolute;
|
|
color: red;
|
|
z-index: 5;
|
|
user-select: none;
|
|
left: 135px;
|
|
top: 17px;
|
|
transform: translate(-50%, -50%);
|
|
animation: money .15s ease-in;
|
|
}
|
|
|
|
@keyframes money{
|
|
from{
|
|
transform: translate(-50%, -50%);
|
|
opacity: 1;
|
|
top: 17px;
|
|
}
|
|
to{
|
|
transform: translate(-50%, -50%);
|
|
opacity: 0;
|
|
top: -10px;
|
|
}
|
|
}
|
|
|
|
.x2{
|
|
background: #eee4da;
|
|
color: #757371;
|
|
}
|
|
.x4{
|
|
background: #ece0ca;
|
|
color: #757371;
|
|
}
|
|
.x8{
|
|
background: #f4b17a;
|
|
color: #fff;
|
|
}
|
|
.x16{
|
|
background: #f59575;
|
|
color: #fff;
|
|
}
|
|
.x32{
|
|
background: #f57c5f;
|
|
color: #fff;
|
|
}
|
|
.x64{
|
|
background: #f65d3b;
|
|
color: #fff;
|
|
}
|
|
.x128{
|
|
background: #edce71;
|
|
color: #fff;
|
|
}
|
|
.x256{
|
|
background: #edcc63;
|
|
color: #fff;
|
|
}
|
|
.x512{
|
|
background: #edc651;
|
|
color: #fff;
|
|
}
|
|
.x1024{
|
|
background: #eec744;
|
|
color: #fff;
|
|
}
|
|
.x2048{
|
|
background: #ecc230;
|
|
color: #fff;
|
|
}
|
|
.x4096{
|
|
background: #fe3d3d;
|
|
color: #fff;
|
|
}
|
|
.x8192{
|
|
background: #ff2020;
|
|
color: #fff;
|
|
} |