121 lines
2.1 KiB
SCSS
121 lines
2.1 KiB
SCSS
@import '../../assets/scss/variables';
|
|
|
|
.split-flap {
|
|
margin: 1vw;
|
|
width: 40px;
|
|
height: 40px;
|
|
line-height: 40px;
|
|
font-size: 40px;
|
|
text-align: center;
|
|
font-family: monospace;
|
|
perspective: 100px;
|
|
color: white;
|
|
|
|
.top-next {
|
|
height: 50%;
|
|
width: 100%;
|
|
background-color: $colLightBlue;
|
|
overflow: hidden;
|
|
z-index: 0;
|
|
position: relative;
|
|
border-radius: 5px 5px 0 0;
|
|
}
|
|
|
|
.top-current {
|
|
margin-top: -50%;
|
|
height: 50%;
|
|
width: 100%;
|
|
background-color: $colLightBlue;
|
|
overflow: hidden;
|
|
z-index: 1;
|
|
position: relative;
|
|
border-radius: 5px 5px 0 0;
|
|
transform-origin: bottom;
|
|
transform: rotateX(0deg);
|
|
|
|
&--animate {
|
|
animation: flipUp ease-in 1;
|
|
animation-duration: 2s;
|
|
animation-fill-mode: forwards;
|
|
}
|
|
|
|
&--stop {
|
|
animation: none;
|
|
}
|
|
}
|
|
|
|
.bottom-current {
|
|
height: 50%;
|
|
width: 100%;
|
|
background-image: linear-gradient(180deg, $colLightBlue, $colDarkBlue);
|
|
overflow: hidden;
|
|
z-index: 1;
|
|
position: relative;
|
|
border-radius: 0 0 5px 5px;
|
|
|
|
span {
|
|
transform: translateY(-50%);
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
.bottom-next {
|
|
margin-top: -50%;
|
|
height: 50%;
|
|
width: 100%;
|
|
background-image: linear-gradient(180deg, $colLightBlue, $colDarkBlue);
|
|
overflow: hidden;
|
|
z-index: 1;
|
|
position: relative;
|
|
border-radius: 0 0 5px 5px;
|
|
transform-origin: top;
|
|
transform: rotateX(90deg);
|
|
|
|
span {
|
|
transform: translateY(-50%);
|
|
display: block;
|
|
}
|
|
|
|
&--animate {
|
|
animation: flipDown ease-out 1;
|
|
animation-duration: 2s;
|
|
animation-fill-mode: forwards;
|
|
}
|
|
|
|
&--stop {
|
|
animation: none;
|
|
}
|
|
}
|
|
|
|
@keyframes flipDown {
|
|
0% {
|
|
transform: rotateX(90deg);
|
|
}
|
|
50% {
|
|
transform: rotateX(90deg);
|
|
}
|
|
100% {
|
|
transform: rotateX(0deg);
|
|
}
|
|
}
|
|
|
|
@keyframes flipUp {
|
|
0% {
|
|
transform: rotateX(0deg);
|
|
}
|
|
50% {
|
|
transform: rotateX(-90deg);
|
|
}
|
|
100% {
|
|
transform: rotateX(-90deg);
|
|
}
|
|
}
|
|
}
|
|
|
|
.container {
|
|
display: flex;
|
|
justify-content: center;
|
|
background-color: #111111;
|
|
border: solid 5px black;
|
|
}
|