81 lines
1.0 KiB
CSS
81 lines
1.0 KiB
CSS
* {
|
|
margin: 0px;
|
|
padding: 0px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
width: 100%;
|
|
height: 100vh;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
user-select: none;
|
|
}
|
|
|
|
#game,
|
|
#player1,
|
|
#player2 {
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
|
|
.score,
|
|
.shape {
|
|
min-width: 200px;
|
|
height: 200px;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.shape {
|
|
border: 1px solid #777;
|
|
border-radius: 1rem;
|
|
}
|
|
|
|
#player1,
|
|
#player2 {
|
|
position: relative;
|
|
}
|
|
|
|
.name {
|
|
font-size: 2rem;
|
|
font-weight: 600;
|
|
position: absolute;
|
|
top: 0px;
|
|
left: 0px;
|
|
}
|
|
|
|
#player2 .name {
|
|
left: auto;
|
|
right: 0px;
|
|
}
|
|
|
|
.score {
|
|
font-size: 100px;
|
|
padding: 0 1rem;
|
|
}
|
|
|
|
#player1 .shape,
|
|
#player2 .shape {
|
|
background-repeat: no-repeat;
|
|
background-size: 200px 200px;
|
|
}
|
|
|
|
.rock {
|
|
background: url(rock.png);
|
|
}
|
|
|
|
.paper {
|
|
background: url(paper.png);
|
|
}
|
|
|
|
.scissors {
|
|
background: url(scissors.png);
|
|
}
|
|
|
|
#player2 .shape {
|
|
transform: scaleX(-1);
|
|
}
|