-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
99 lines (80 loc) · 1.87 KB
/
style.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/* General settings */
@import url('https://fonts.googleapis.com/css2?family=Acme&family=Amatic+SC:wght@700&display=swap');
html {
box-sizing: border-box;
background-color: #c3f37b;
font-family: 'Acme', sans-serif;
}
body {
margin: 0;
}
/* Panels' settings */
.panels {
display: flex;
overflow: hidden;
height: 100vh;
cursor: pointer;
}
.panel {
display: flex;
justify-content: center;
flex-direction: column;
flex: 1;
text-align: center;
align-items: center;
background-size: cover;
background-position: center;
box-shadow: inset 0 0 0 .5vmin rgba(196, 195, 195, 0.1);
color: #fff;
font-size: 2vmin;
transition: 0.7s cubic-bezier(0.61, -0.19, 0.7, -0.11),
flex 0.7s cubic-bezier(0.61, -0.19, 0.7, -0.11);
}
/* Images for the panels */
.panel01 { background-image: url('img/img-01.jpg'); }
.panel02 { background-image: url('img/img-02.jpg'); }
.panel03 { background-image: url('img/img-03.jpg'); }
.panel04 { background-image: url('img/img-04.jpg'); }
.panel05 { background-image: url('img/img-05.jpg'); }
/* Flex items */
.panel > * {
display: flex;
justify-content: center;
align-items: center;
flex: 1 0 auto;
margin: 0;
min-width: 100%;
transition: transform .5s;
}
.panel > *:first-child {
transform: translateY(-100%);
}
.panel.open-active > *:first-child {
transform: translateY(0);
}
.panel > *:last-child {
transform: translateY(100%);
}
.panel.open-active > *:last-child {
transform: translateY(0);
}
/* Text from each panel */
.panel p {
text-transform: uppercase;
text-shadow: 0 0 1vmax rgba(0, 0, 0, 0.72), 0 0 1vmax rgba(0, 0, 0, 0.45);
font-size: 2em;
user-select: none;
background-color: rgba(0, 0, 0, 0.45);
}
.panel p:nth-child(2) {
font-size: 3.7em;
}
.panel.open {
flex: 5;
font-size: 2vmax;
}
@media only screen and (max-width: 600px) {
.panel p {
font-size: 1.5em;
}
}