Improve layout
This commit is contained in:
40
style.css
40
style.css
@@ -4,7 +4,7 @@ body {
|
||||
overflow: hidden;
|
||||
background: #202028;
|
||||
font-family: Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 40px;
|
||||
font-size: 2.5em;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@@ -100,24 +100,28 @@ body {
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
#score, #controls {
|
||||
#game-stats {
|
||||
position: absolute;
|
||||
font-weight: 900;
|
||||
top: 50%;
|
||||
right: 75%;
|
||||
transform: translate(-50%, -50%);
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%) translateX(-30vw);
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#score:before {
|
||||
#score {
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
#time:before, #score:before {
|
||||
content: attr(data-prefix);
|
||||
}
|
||||
|
||||
#controls {
|
||||
left: 75%;
|
||||
right: 0;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%) translateX(30vw);
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
transform: translate(0, -50%);
|
||||
}
|
||||
|
||||
#footer {
|
||||
@@ -156,23 +160,25 @@ body {
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
#time {
|
||||
margin-top: 5px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
@media (max-width: 1400px) {
|
||||
#tetris, #tetris-background {
|
||||
height: 75%;
|
||||
}
|
||||
|
||||
#score {
|
||||
#game-stats {
|
||||
top: 10px;
|
||||
left: 50%;
|
||||
right: initial;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
#game-stats > div {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#time {
|
||||
margin-right: 50px;
|
||||
}
|
||||
|
||||
#controls {
|
||||
top: initial;
|
||||
bottom: 10px;
|
||||
|
Reference in New Issue
Block a user