Add holding canvas and improve UI layouts
This commit is contained in:
182
style.css
182
style.css
@@ -8,13 +8,64 @@ body {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#language-selector {
|
||||
.menu {
|
||||
-webkit-transition: 0.1s -webkit-transform linear;
|
||||
transition: 0.1s -webkit-transform linear;
|
||||
transition: 0.1s transform linear;
|
||||
transition: 0.1s transform linear, 0.1s -webkit-transform linear;
|
||||
position: absolute;
|
||||
right: 15px;
|
||||
top: 20px;
|
||||
font-size: 14px;
|
||||
font-weight: 300;
|
||||
background: 0;
|
||||
float: left;
|
||||
height: 2.7rem;
|
||||
width: 3.5rem;
|
||||
z-index: 1;
|
||||
outline: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
-webkit-transform: scale(.5);
|
||||
-moz-transform: scale(.5);
|
||||
-ms-transform: scale(.5);
|
||||
-o-transform: scale(.5);
|
||||
transform: scale(.5);
|
||||
}
|
||||
|
||||
#menu {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, .75);
|
||||
transform: translateX(-100%);
|
||||
-webkit-transition: transform .5s;
|
||||
-moz-transition: transform .5s;
|
||||
-ms-transition: transform .5s;
|
||||
-o-transition: transform .5s;
|
||||
transition: transform .5s;
|
||||
z-index: 100;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
#menu-content {
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: .6em;
|
||||
}
|
||||
|
||||
#menu-content > * {
|
||||
padding: 20px;
|
||||
border-bottom: 1px solid #444;
|
||||
}
|
||||
|
||||
.menu-open #menu {
|
||||
transform: none;
|
||||
}
|
||||
|
||||
#menu-opener {
|
||||
position: absolute;
|
||||
left: 10px;
|
||||
top: 10px;
|
||||
z-index: 101;
|
||||
}
|
||||
|
||||
.lang {
|
||||
@@ -81,6 +132,15 @@ body {
|
||||
filter: url(#f1);
|
||||
}
|
||||
|
||||
#canvas-container {
|
||||
height: 936px;
|
||||
width: 761px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
#tetris, #tetris-background {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
@@ -100,6 +160,18 @@ body {
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
#tetris-hold {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
border: solid .2em #fff;
|
||||
}
|
||||
|
||||
#tetris-upcoming {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
transform: translateX(.2em);
|
||||
}
|
||||
|
||||
#game-stats {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
@@ -122,6 +194,7 @@ body {
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%) translateX(30vw);
|
||||
font-size: 20px;
|
||||
max-width: 20vw;
|
||||
}
|
||||
|
||||
#footer {
|
||||
@@ -160,31 +233,6 @@ body {
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
|
||||
#menu-opener {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.menu {
|
||||
-webkit-transition: 0.1s -webkit-transform linear;
|
||||
transition: 0.1s -webkit-transform linear;
|
||||
transition: 0.1s transform linear;
|
||||
transition: 0.1s transform linear, 0.1s -webkit-transform linear;
|
||||
position: absolute;
|
||||
background: 0;
|
||||
float: left;
|
||||
height: 2.7rem;
|
||||
width: 3.5rem;
|
||||
z-index: 1;
|
||||
outline: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
-webkit-transform: scale(.5);
|
||||
-moz-transform: scale(.5);
|
||||
-ms-transform: scale(.5);
|
||||
-o-transform: scale(.5);
|
||||
transform: scale(.5);
|
||||
}
|
||||
|
||||
.bar, .bar::before, .bar::after {
|
||||
-webkit-transition: 0.2s background linear 0.1s, 0.2s top linear 0.2s, 0.2s -webkit-transform linear;
|
||||
transition: 0.2s background linear 0.1s, 0.2s top linear 0.2s, 0.2s -webkit-transform linear;
|
||||
@@ -293,31 +341,57 @@ body {
|
||||
#control-text {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
#menu {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, .75);
|
||||
transform: translateX(-100%);
|
||||
-webkit-transition: transform .5s;
|
||||
-moz-transition: transform .5s;
|
||||
-ms-transition: transform .5s;
|
||||
-o-transition: transform .5s;
|
||||
transition: transform .5s;
|
||||
z-index: 100;
|
||||
top: 0;
|
||||
}
|
||||
/*
|
||||
Radio Buttons
|
||||
*/
|
||||
|
||||
.menu-open #menu {
|
||||
transform: none;
|
||||
}
|
||||
.radio {
|
||||
margin: 0.5rem;
|
||||
}
|
||||
|
||||
#menu-opener {
|
||||
position: absolute;
|
||||
display: block;
|
||||
left: 10px;
|
||||
top: 10px;
|
||||
z-index: 101;
|
||||
}
|
||||
.radio input[type="radio"] {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.radio input[type="radio"] + .radio-label:before {
|
||||
content: '';
|
||||
background: #f4f4f4;
|
||||
border-radius: 100%;
|
||||
border: 1px solid #b4b4b4;
|
||||
display: inline-block;
|
||||
width: 1.4em;
|
||||
height: 1.4em;
|
||||
position: relative;
|
||||
top: -0.2em;
|
||||
margin-right: 1em;
|
||||
vertical-align: top;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
-webkit-transition: all 250ms ease;
|
||||
transition: all 250ms ease;
|
||||
}
|
||||
|
||||
.radio input[type="radio"]:checked + .radio-label:before {
|
||||
background-color: #3197EE;
|
||||
-webkit-box-shadow: inset 0 0 0 4px #f4f4f4;
|
||||
box-shadow: inset 0 0 0 4px #f4f4f4;
|
||||
}
|
||||
|
||||
.radio input[type="radio"]:focus + .radio-label:before {
|
||||
outline: none;
|
||||
border-color: #3197EE;
|
||||
}
|
||||
|
||||
.radio input[type="radio"]:disabled + .radio-label:before {
|
||||
-webkit-box-shadow: inset 0 0 0 4px #f4f4f4;
|
||||
box-shadow: inset 0 0 0 4px #f4f4f4;
|
||||
border-color: #b4b4b4;
|
||||
background: #b4b4b4;
|
||||
}
|
||||
|
||||
.radio input[type="radio"] + .radio-label:empty:before {
|
||||
margin-right: 0;
|
||||
}
|
Reference in New Issue
Block a user