Files
METH_Transcendence/docker-compose/requirements/nginx/static/style/game/games.css
Kum1ta 7d319d020b Site
- add gamepad for play on mobile
    - merge
2024-09-27 21:16:53 +02:00

168 lines
3.0 KiB
CSS

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* games.css :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/20 11:23:41 by edbernar #+# #+# */
/* Updated: 2024/09/27 21:05:45 by edbernar ### ########.fr */
/* */
/* ************************************************************************** */
@keyframes fadeInGames {
from {
filter: brightness(1);
}
to {
filter: brightness(0);
}
}
@keyframes fadeOutGames {
from {
filter: brightness(0);
}
to {
filter: brightness(1);
}
}
@keyframes fadeOutStartGames {
0% {
filter: brightness(0);
}
70% {
filter: brightness(0);
}
100% {
filter: brightness(1);
}
}
@keyframes fadeInTextGames {
from {
color: rgb(255, 255, 255, 0.1);
}
to {
color: rgb(255, 255, 255, 1);
}
}
@keyframes fadeOutTextGames {
from {
color: rgb(255, 255, 255, 1);
}
to {
color: rgb(255, 255, 255, 0.1);
}
}
@keyframes end {
0% {
opacity: 1;
}
75% {
opacity: 0;
}
100% {
opacity: 1;
}
}
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
user-select: none;
}
#score {
line-height: 1.75;
vertical-align: top;
font-family: 'Poppins';
position: absolute;
font-size: 30vh;
top: 0;
bottom : 50%;
left: 50%;
transform: translate(-50%, 50%);
z-index: 800;
margin: 0;
padding: 0;
white-space: nowrap;
/* font-weight: 900; */
color: rgb(255, 255, 255, 0.1);
}
.gamePad {
display: none;
position: absolute;
z-index: 800;
width: 100%;
height: 100%;
}
.gamePad #fullscreen {
position: absolute;
top: 20px;
right: 20px;
width: 50px;
height: 50px;
background-repeat: no-repeat;
background-size: 80% 80%;
background-position: center;
border: none;
opacity: 0.5;
}
.gamePad .gamePadLeft {
display: flex;
position: absolute;
left: 50px;
bottom: 50px;
}
.gamePad .gamePadRight {
display: flex;
position: absolute;
flex-direction: column;
right: 50px;
bottom: 50px;
}
.gamePad .buttonGamePad
{
width: 100px;
height: 100px;
background-color: rgba(255, 255, 255, 0.1);
background-repeat: no-repeat;
background-size: 80% 80%;
background-position: center;
border: none;
}
.gamePadLeft #padRight {
margin-left: 50px;
transform: rotate(180deg);
}
.gamePadRight #padTop {
margin-bottom: 20px;
transform: rotate(90deg);
}
.gamePadRight #padBottom {
transform: rotate(270deg);
}
#canvasMultiGameOnline {
user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
touch-action: none;
}