/
style.css
84 lines (70 loc) · 1.77 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
@import url('https://fonts.googleapis.com/css?family=Amatic+SC');
body {
margin: 0;
font-size: 20px;
font-weight: 200;
}
.panels {
display: flex;
height: 100vh;
overflow: hidden;
}
.panel {
display: flex;
flex: 1;
flex-direction: column;
justify-content: center;
text-align: center;
align-items: center;
background-size: cover;
background-position: center;
box-shadow:inset 0 0 0 5px rgba(255,255,255,0.1);
transition: font-size 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),
background 0.2s;
}
#one {
background-image :url('https://images.unsplash.com/photo-1483114207198-9162fa6c3d2d?dpr=1&auto=format&fit=crop&w=1000&h=1000');
}
#two {
background-image: url('https://images.unsplash.com/photo-1461009209120-103a8f970745?dpr=1&auto=format&fit=crop&w=1000&h=1000');
}
#three {
background-image: url('https://images.unsplash.com/photo-1500278170415-daa5b83e9443?dpr=1&auto=format&fit=crop&w=1000&h=1000');
}
#four {
background-image: url('https://images.unsplash.com/photo-1504217051514-96afa06398be?dpr=1&auto=format&fit=crop&w=1000&h=1000');
}
.panel * {
margin:0;
width: 100%;
justify-content: center;
align-items: center;
display:flex;
flex: 1 0 auto;
transition:transform 0.5s;
}
.panel *:first-child {
transform: translateY(-100%);
}
.panel *:last-child {
transform: translateY(100%);
}
.panel.open-active *:first-child,
.panel.open-active *:last-child {
transform: translateY(0);
}
.panel p {
font-family: 'Amatic SC', cursive;
color: white;
font-size: 2em;
text-transform: uppercase;
text-shadow: 0 0 4px rgba(0, 0, 0, 0.72), 0 0 14px rgba(0, 0, 0, 0.45);
}
.panel p:nth-child(2) {
font-size: 4em;
}
.panel.open {
flex: 5;
font-size:40px;
}