forked from migueravila/bento
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
180 lines (156 loc) · 4.15 KB
/
Copy pathstyle.css
File metadata and controls
180 lines (156 loc) · 4.15 KB
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
/*
All grid code is placed in a 'supports' rule (feature query) at the bottom of the CSS (Line 77).
The 'supports' rule will only run if your browser supports CSS grid.
Flexbox is used as a fallback so that browsers which don't support grid will still recieve an identical layout.
*/
@import url(https://fonts.googleapis.com/css?family=Montserrat:500);
:root {
/* Base font size */
font-size: 10px;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
background-image: url("img/bgw.jpg");
background-size: cover;
background-position: center;
min-height: 100vh;
background-color: #fafafa;
}
.container {
max-width: 100rem;
margin: 0 auto;
padding: 0 2rem 2rem;
}
.heading {
font-family: "Montserrat", Arial, sans-serif;
font-size: 4rem;
font-weight: 500;
line-height: 1.5;
text-align: center;
padding: 3.5rem 0;
color: #1a1a1a;
}
.heading span {
display: block;
}
.gallery {
display: flex;
flex-wrap: wrap;
/* Compensate for excess margin on outer gallery flex items */
margin: -1rem -1rem;
}
.gallery-item {
/* Minimum width of 24rem and grow to fit available space */
flex: 1 0 24rem;
/* Margin value should be half of grid-gap value as margins on flex items don't collapse */
margin: 1rem;
box-shadow: 0.3rem 0.4rem 0.4rem rgba(0, 0, 0, 0.4);
overflow: hidden;
}
.gallery-image {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 400ms ease-out;
}
.banner {
display: grid;
place-items: center; /* Zentriert horizontal UND vertikal gleichzeitig */
height: 80px;
}
.heading {
-webkit-animation-name: slideInLeft;
animation-name: slideInLeft;
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@-webkit-keyframes slideInLeft {
0% {
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
visibility: visible;
}
100% {
-webkit-transform: translateX(0);
transform: translateX(0);
}
}
@keyframes slideInLeft {
0% {
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
visibility: visible;
}
100% {
-webkit-transform: translateX(0);
transform: translateX(0);
}
}
.image-container {
display: grid;
place-items: center; /* Zentriert horizontal UND vertikal gleichzeitig */
height: 80px;
-webkit-animation-name: zoomInDown;
animation-name: zoomInDown;
-webkit-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
@-webkit-keyframes zoomInDown {
0% {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
-webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
-webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
}
}
@keyframes zoomInDown {
0% {
opacity: 0;
-webkit-transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
transform: scale3d(.1, .1, .1) translate3d(0, -1000px, 0);
-webkit-animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
animation-timing-function: cubic-bezier(0.550, 0.055, 0.675, 0.190);
}
60% {
opacity: 1;
-webkit-transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
transform: scale3d(.475, .475, .475) translate3d(0, 60px, 0);
-webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
animation-timing-function: cubic-bezier(0.175, 0.885, 0.320, 1);
}
}
.gallery-image:hover {
transform: scale(1.15);
}
/*
The following rule will only run if your browser supports CSS grid.
Remove or comment-out the code block below to see how the browser will fall-back to flexbox styling.
*/
@supports (display: grid) {
.gallery {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
grid-gap: 2rem;
}
.gallery,
.gallery-item {
margin: 0;
}
}